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
..
2014-05-01 12:08:53 -07:00
2013-09-04 16:01:24 -07:00
2013-12-18 16:46:35 -08:00
2014-05-05 13:56:59 -07:00
2013-12-18 16:46:35 -08:00
2014-01-07 10:33:11 -08:00
2013-10-31 14:58:04 -07:00
2013-10-31 14:58:04 -07:00
2013-12-18 16:46:35 -08:00
2013-11-04 10:55:25 -08:00
2013-12-18 16:46:35 -08:00
2013-12-18 16:46:35 -08:00
2014-03-04 12:22:24 -08:00
2013-12-18 16:46:35 -08:00
2014-02-21 12:10:40 -08:00
2014-03-31 16:10:57 -07:00
2013-12-18 16:46:35 -08:00
2014-04-20 16:55:42 -07:00
2013-12-18 16:46:35 -08:00
2013-10-25 13:59:40 -07:00
2014-05-06 10:41:17 -07:00
2013-09-04 16:01:24 -07:00
2013-09-25 15:44:22 -07:00
2010-08-31 13:41:59 -07:00
2010-08-31 13:41:58 -07:00
2013-11-04 10:55:25 -08:00
2013-12-18 16:46:35 -08:00
2014-05-14 16:20:21 -07:00
2013-09-04 16:01:24 -07:00
2013-10-31 14:58:04 -07:00
2012-08-27 12:01:37 -07:00
2013-12-18 16:46:35 -08:00
2013-10-31 14:58:04 -07:00
2013-12-18 16:46:35 -08:00
2013-10-31 14:58:04 -07:00
2013-10-31 14:58:04 -07:00
2013-12-18 16:46:35 -08:00
2013-11-04 10:55:25 -08:00
2010-08-31 13:41:58 -07:00
2013-12-18 16:46:35 -08:00
2013-12-18 16:46:35 -08:00
2014-04-02 13:10:08 -07:00
2013-10-30 14:51:27 -07:00
2013-10-31 14:58:04 -07:00
2013-10-31 14:58:04 -07:00
2013-12-18 16:46:35 -08:00
2013-12-18 16:46:35 -08:00
2014-01-09 15:50:23 -08:00
2014-05-01 10:11:18 -07:00
2013-12-18 16:46:35 -08:00
2013-10-31 14:58:04 -07:00
2013-10-31 14:58:04 -07:00
2013-12-18 16:46:35 -08:00
2013-12-18 16:46:35 -08:00
2013-12-18 16:46:35 -08:00
2014-05-01 10:11:18 -07:00
2013-12-18 16:46:35 -08:00
2010-09-17 16:24:15 -07:00
2014-01-14 14:46:12 -08:00