diff options
author | Brian Foster <bfoster@redhat.com> | 2019-02-07 19:45:47 +0100 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2019-02-12 01:07:01 +0100 |
commit | 27df4f5045fc68766980c4dfba5ffc9ad1f71ebb (patch) | |
tree | e3a9f981dda44a14ced4f7e7287f2bd70091ab39 /fs/xfs/xfs_log_recover.c | |
parent | xfs: distinguish between inobt and finobt magic values (diff) | |
download | linux-27df4f5045fc68766980c4dfba5ffc9ad1f71ebb.tar.xz linux-27df4f5045fc68766980c4dfba5ffc9ad1f71ebb.zip |
xfs: split up allocation btree verifier
Similar to the inode btree verifier, the same allocation btree
verifier structure is shared between the by-bno (bnobt) and by-size
(cntbt) btrees. This prevents the ability to distinguish magic
values between them. Separate the verifier into two, one for each
tree, and assign them appropriately. No functional changes.
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 '')
-rw-r--r-- | fs/xfs/xfs_log_recover.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index 228c754bb137..5ad42d598333 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c @@ -2439,10 +2439,12 @@ xlog_recover_validate_buf_type( case XFS_BLFT_BTREE_BUF: switch (magic32) { case XFS_ABTB_CRC_MAGIC: - case XFS_ABTC_CRC_MAGIC: case XFS_ABTB_MAGIC: + bp->b_ops = &xfs_bnobt_buf_ops; + break; + case XFS_ABTC_CRC_MAGIC: case XFS_ABTC_MAGIC: - bp->b_ops = &xfs_allocbt_buf_ops; + bp->b_ops = &xfs_cntbt_buf_ops; break; case XFS_IBT_CRC_MAGIC: case XFS_IBT_MAGIC: |