FreeBSD src
Go to file
Tim Chase 83021b47c2 Calculate header size correctly in sa_find_sizes()
In the case where a variable-sized SA overlaps the spill block pointer and
a new variable-sized SA is being added, the header size was improperly
calculated to include the to-be-moved SA.  This problem could be
reproduced when xattr=sa enabled as follows:

	ln -s $(perl -e 'print "x" x 120') blah
	setfattr -n security.selinux -v blahblah -h blah

The symlink is large enough to interfere with the spill block pointer and
has a typical SA registration as follows (shown in modified "zdb -dddd"
<SA attr layout obj> format):

	[ ... ZPL_DACL_COUNT ZPL_DACL_ACES ZPL_SYMLINK ]

Adding the SA xattr will attempt to extend the registration to:

	[ ... ZPL_DACL_COUNT ZPL_DACL_ACES ZPL_SYMLINK ZPL_DXATTR ]

but since the ZPL_SYMLINK SA interferes with the spill block pointer, it
must also be moved to the spill block which will have a registration of:

	[ ZPL_SYMLINK ZPL_DXATTR ]

This commit updates extra_hdrsize when this condition occurs, allowing
hdrsize to be subsequently decreased appropriately.

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ned Bass <bass6@llnl.gov>
Issue #2214
Issue #2228
Issue #2316
Issue #2343
2014-05-19 11:55:50 -07:00
cmd Handle ZPOOL_STATUS_HOSTID_MISMATCH in zpool status 2014-05-19 10:16:29 -07:00
config Refactor inode_owner_or_capable() autotools check 2014-05-01 10:06:49 -07:00
dracut Refresh dracut module setup 2013-03-21 12:51:06 -07:00
etc Remove SELinux enforcing check from init scripts 2014-05-02 11:37:46 -07:00
include Allow for lock-free reading zfsdev_state_list. 2014-05-19 11:45:11 -07:00
lib Check the dataset type more rigorously when fetching properties. 2014-05-06 10:41:46 -07:00
man Illumos #4101 finer-grained control of metaslab_debug 2014-05-06 09:46:04 -07:00
module Calculate header size correctly in sa_find_sizes() 2014-05-19 11:55:50 -07:00
patches
rpm Initial implementation of zed (ZFS Event Daemon) 2014-04-02 13:10:03 -07:00
scripts Various zimport.sh fixes 2014-04-17 09:30:55 -07:00
udev Open pools asynchronously after module load 2013-07-03 09:24:38 -07:00
.gitignore Ignore *.{deb,rpm,tar.gz} files in the top directory. 2013-04-24 16:18:59 -07:00
.gitmodules Add zimport.sh compatibility test script 2014-02-21 12:10:31 -08:00
AUTHORS Fix minor typos and update marketing copy. 2013-03-21 12:51:06 -07:00
autogen.sh build: do not call boilerplate ourself 2013-04-02 10:55:20 -07:00
configure.ac Initial implementation of zed (ZFS Event Daemon) 2014-04-02 13:10:03 -07:00
copy-builtin Consistent menuconfig name 2012-08-26 13:49:37 -07:00
COPYRIGHT Refresh links to web site 2013-03-06 15:46:41 -08:00
DISCLAIMER Fix minor typos and update marketing copy. 2013-03-21 12:51:06 -07:00
Makefile.am cstyle: Exclude several files from 'make checkstyle' 2013-12-18 16:46:35 -08:00
META Tag zfs-0.6.2 2013-08-22 13:33:26 -07:00
OPENSOLARIS.LICENSE
README.markdown Fix minor typos and update marketing copy. 2013-03-21 12:51:06 -07:00
zfs-script-config.sh.in Initial implementation of zed (ZFS Event Daemon) 2014-04-02 13:10:03 -07:00
zfs.release.in

Native ZFS for Linux!

ZFS is an advanced file system and volume manager which was originally developed for Solaris and is now maintained by the Illumos community.

ZFS on Linux, which is also known as ZoL, is currently feature complete. It includes fully functional and stable SPA, DMU, ZVOL, and ZPL layers.

Full documentation for installing ZoL on your favorite Linux distribution can be found at: http://zfsonlinux.org