Date: Sat, 4 May 2013 00:56:03 GMT From: Adam Nowacki <nowak@tepeserwery.pl> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/178329: [zfs] extended attributes leak Message-ID: <201305040056.r440u3Gi064105@red.freebsd.org> Resent-Message-ID: <201305040100.r44100AI043268@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 178329 >Category: kern >Synopsis: [zfs] extended attributes leak >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat May 04 01:00:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Adam Nowacki >Release: 9.1-RELEASE >Organization: >Environment: FreeBSD storage 9.1-RELEASE FreeBSD 9.1-RELEASE #5: Tue Apr 30 15:08:36 UTC 2013 root@storage:/usr/obj/usr/src/sys/GENERIC amd64 >Description: ZFS objects used to store extended attributes are not deleted when parent file/directory is deleted. Those objects still occupy disk space but are otherwise unreferenced and can't be deleted. So far I've traced it down to sys\cddl\contrib\opensolaris\uts\common\fs\zfs\zfs_dir.c:zfs_rmnode. ZTOV(zp) is NULL for extended attributes directory (object 9) so zfs_purgedir is not called and object 10 is left alone. >How-To-Repeat: # zfs create -o mountpoint=/test root/test # touch /test/file1 # setextattr user test abc /test/file1 # zdb root/test Object lvl iblk dblk dsize lsize %full type 8 1 16K 512 0 512 0.00 ZFS plain file 9 1 16K 512 1K 512 100.00 ZFS directory 10 1 16K 512 512 512 100.00 ZFS plain file object 8 - the file, object 9 - extended attributes directory, object 10 - value of the 'test' extended attribute ("abc") # rm /test/file1 # zdb root/test Object lvl iblk dblk dsize lsize %full type 10 1 16K 512 512 512 100.00 ZFS plain file objects 8 and 9 are deleted, object 10 is still there (leaked). >Fix: >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201305040056.r440u3Gi064105>