summaryrefslogtreecommitdiffstats
path: root/module/zfs/vdev_file.c
diff options
context:
space:
mode:
authorTim Chase <[email protected]>2014-05-10 20:13:12 -0500
committerBrian Behlendorf <[email protected]>2014-05-19 11:55:50 -0700
commit83021b47c2870c0ba948cbcfe08f41bd7730f5fb (patch)
tree33b90baa091ae8c9e1f284bdfd6de6c553fe2020 /module/zfs/vdev_file.c
parent3937ab20f32fc7b79cacfd91c0891f4e1b4ab2de (diff)
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 <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Signed-off-by: Ned Bass <[email protected]> Issue #2214 Issue #2228 Issue #2316 Issue #2343
Diffstat (limited to 'module/zfs/vdev_file.c')
0 files changed, 0 insertions, 0 deletions