aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_ialloc_btree.c
diff options
context:
space:
mode:
authorBrian Foster <bfoster@redhat.com>2019-02-07 13:45:46 -0500
committerDarrick J. Wong <darrick.wong@oracle.com>2019-02-11 19:07:01 -0500
commit01e68f40bf7846b58d2734aa11b0cbcaadbeaa3e (patch)
treeaa2d827811f0df449099c0feb2063e9f85792788 /fs/xfs/libxfs/xfs_ialloc_btree.c
parente34d3e74eb8f6eb020312cec747ff55ee1d1ca18 (diff)
xfs: create a separate finobt verifier
The inobt verifier is reused for the inobt and finobt, which prevents the ability to distinguish between magic values on a per-tree basis. Create a separate finobt structure in preparation for changes to enforce the appropriate magic value for the associated tree. This patch has no functional change. 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_ialloc_btree.c')
-rw-r--r--fs/xfs/libxfs/xfs_ialloc_btree.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_ialloc_btree.c b/fs/xfs/libxfs/xfs_ialloc_btree.c
index 9b25e7a0df47..798269eb4767 100644
--- a/fs/xfs/libxfs/xfs_ialloc_btree.c
+++ b/fs/xfs/libxfs/xfs_ialloc_btree.c
@@ -333,6 +333,13 @@ const struct xfs_buf_ops xfs_inobt_buf_ops = {
333 .verify_struct = xfs_inobt_verify, 333 .verify_struct = xfs_inobt_verify,
334}; 334};
335 335
336const struct xfs_buf_ops xfs_finobt_buf_ops = {
337 .name = "xfs_finobt",
338 .verify_read = xfs_inobt_read_verify,
339 .verify_write = xfs_inobt_write_verify,
340 .verify_struct = xfs_inobt_verify,
341};
342
336STATIC int 343STATIC int
337xfs_inobt_keys_inorder( 344xfs_inobt_keys_inorder(
338 struct xfs_btree_cur *cur, 345 struct xfs_btree_cur *cur,
@@ -389,7 +396,7 @@ static const struct xfs_btree_ops xfs_finobt_ops = {
389 .init_rec_from_cur = xfs_inobt_init_rec_from_cur, 396 .init_rec_from_cur = xfs_inobt_init_rec_from_cur,
390 .init_ptr_from_cur = xfs_finobt_init_ptr_from_cur, 397 .init_ptr_from_cur = xfs_finobt_init_ptr_from_cur,
391 .key_diff = xfs_inobt_key_diff, 398 .key_diff = xfs_inobt_key_diff,
392 .buf_ops = &xfs_inobt_buf_ops, 399 .buf_ops = &xfs_finobt_buf_ops,
393 .diff_two_keys = xfs_inobt_diff_two_keys, 400 .diff_two_keys = xfs_inobt_diff_two_keys,
394 .keys_inorder = xfs_inobt_keys_inorder, 401 .keys_inorder = xfs_inobt_keys_inorder,
395 .recs_inorder = xfs_inobt_recs_inorder, 402 .recs_inorder = xfs_inobt_recs_inorder,