summaryrefslogtreecommitdiffstats
path: root/tools/cgroup
diff options
context:
space:
mode:
authorBrian Foster <bfoster@redhat.com>2015-04-13 11:27:10 +1000
committerDave Chinner <david@fromorbit.com>2015-04-13 11:27:10 +1000
commite87021a2bc100d330ae859c2cc0614be3e335c5a (patch)
treeccda58aff1bf2497ed11f2cc4bc6bbf37552f6ad /tools/cgroup
parent2f6612415436bab4d923a61d8df399b134247810 (diff)
downloadop-kernel-dev-e87021a2bc100d330ae859c2cc0614be3e335c5a.zip
op-kernel-dev-e87021a2bc100d330ae859c2cc0614be3e335c5a.tar.gz
xfs: use larger in-core attr firstused field and detect overflow
The on-disk xfs_attr3_leaf_hdr structure firstused field is 16-bit and subject to overflow when fs block size is 64k. The field is typically initialized to block size when an attr leaf block is initialized. This problem is demonstrated by assert failures when running xfstests generic/117 on an fs with 64k blocks. To support the existing attr leaf block algorithms for insertion, rebalance and entry movement, increase the size of the in-core firstused field to 32-bit and handle the potential overflow on conversion to/from the on-disk structure. If the overflow condition occurs, set a special value in the firstused field that is translated back on header read. The special value is only required in the case of an empty 64k attr block. A value of zero is used because firstused is initialized to the block size and grows backwards from there. Furthermore, the attribute block header occupies the first bytes of the block. Thus, a value of zero has no other legitimate meaning for this structure. Two new conversion helpers are created to manage the conversion of firstused to and from disk. Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'tools/cgroup')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud