aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs
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
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')
-rw-r--r--fs/xfs/libxfs/xfs_ag.c2
-rw-r--r--fs/xfs/libxfs/xfs_ialloc_btree.c9
-rw-r--r--fs/xfs/libxfs/xfs_shared.h1
3 files changed, 10 insertions, 2 deletions
diff --git a/fs/xfs/libxfs/xfs_ag.c b/fs/xfs/libxfs/xfs_ag.c
index 999ad8d00d43..bde67ef3ff43 100644
--- a/fs/xfs/libxfs/xfs_ag.c
+++ b/fs/xfs/libxfs/xfs_ag.c
@@ -361,7 +361,7 @@ xfs_ag_init_headers(
361 { /* FINO root block */ 361 { /* FINO root block */
362 .daddr = XFS_AGB_TO_DADDR(mp, id->agno, XFS_FIBT_BLOCK(mp)), 362 .daddr = XFS_AGB_TO_DADDR(mp, id->agno, XFS_FIBT_BLOCK(mp)),
363 .numblks = BTOBB(mp->m_sb.sb_blocksize), 363 .numblks = BTOBB(mp->m_sb.sb_blocksize),
364 .ops = &xfs_inobt_buf_ops, 364 .ops = &xfs_finobt_buf_ops,
365 .work = &xfs_btroot_init, 365 .work = &xfs_btroot_init,
366 .type = XFS_BTNUM_FINO, 366 .type = XFS_BTNUM_FINO,
367 .need_init = xfs_sb_version_hasfinobt(&mp->m_sb) 367 .need_init = xfs_sb_version_hasfinobt(&mp->m_sb)
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,
diff --git a/fs/xfs/libxfs/xfs_shared.h b/fs/xfs/libxfs/xfs_shared.h
index 1c5debe748f0..9855f4d2f98f 100644
--- a/fs/xfs/libxfs/xfs_shared.h
+++ b/fs/xfs/libxfs/xfs_shared.h
@@ -36,6 +36,7 @@ extern const struct xfs_buf_ops xfs_dquot_buf_ops;
36extern const struct xfs_buf_ops xfs_symlink_buf_ops; 36extern const struct xfs_buf_ops xfs_symlink_buf_ops;
37extern const struct xfs_buf_ops xfs_agi_buf_ops; 37extern const struct xfs_buf_ops xfs_agi_buf_ops;
38extern const struct xfs_buf_ops xfs_inobt_buf_ops; 38extern const struct xfs_buf_ops xfs_inobt_buf_ops;
39extern const struct xfs_buf_ops xfs_finobt_buf_ops;
39extern const struct xfs_buf_ops xfs_inode_buf_ops; 40extern const struct xfs_buf_ops xfs_inode_buf_ops;
40extern const struct xfs_buf_ops xfs_inode_buf_ra_ops; 41extern const struct xfs_buf_ops xfs_inode_buf_ra_ops;
41extern const struct xfs_buf_ops xfs_dquot_buf_ops; 42extern const struct xfs_buf_ops xfs_dquot_buf_ops;