diff options
author | Brian Foster <bfoster@redhat.com> | 2019-02-07 10:45:47 -0800 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2019-02-11 16:07:01 -0800 |
commit | b8f89801664f8413a88cf2c7539d1aeae07dd3c5 (patch) | |
tree | a109a552d7bd5e90572350a43d6853e8db9a817e /fs/xfs/libxfs/xfs_refcount_btree.c | |
parent | 27df4f5045fc68766980c4dfba5ffc9ad1f71ebb (diff) | |
download | linux-b8f89801664f8413a88cf2c7539d1aeae07dd3c5.tar.bz2 |
xfs: distinguish between bnobt and cntbt magic values
The allocation btree verifiers share code that is unable to detect
cross-tree magic value corruptions such as a bnobt block with a
cntbt magic value. Populate the b_ops->magic field of the associated
verifier structures such that the structure verifier can check the
magic value against the expected value based on tree type.
The btree level check requires knowledge of the tree type to
determine the appropriate maximum value. This was previously part of
the hardcoded magic value checks. With that code removed, peek at
the first magic value in the verifier to determine the expected tree
type of the current block.
Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_refcount_btree.c')
0 files changed, 0 insertions, 0 deletions