summaryrefslogtreecommitdiff
path: root/fs/xfs/scrub
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@redhat.com>2019-08-28 03:35:12 +0300
committerDarrick J. Wong <darrick.wong@oracle.com>2019-08-28 18:31:02 +0300
commit7f313eda8fcc6a250803abb1aef3d6dc5c32f9ad (patch)
tree26c1f9695c6672edd1520435838cd178223e468d /fs/xfs/scrub
parentffb5696f7555e44c04b7c1212fcd83ddedc43498 (diff)
downloadlinux-7f313eda8fcc6a250803abb1aef3d6dc5c32f9ad.tar.xz
xfs: log proper length of btree block in scrub/repair
xfs_trans_log_buf() takes a final argument of the last byte to log in the buffer; b_length is in basic blocks, so this isn't the correct last byte. Fix it. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Dave Chinner <dchinner@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/scrub')
-rw-r--r--fs/xfs/scrub/repair.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/scrub/repair.c b/fs/xfs/scrub/repair.c
index 4cfeec57fb05..7bcc755beb40 100644
--- a/fs/xfs/scrub/repair.c
+++ b/fs/xfs/scrub/repair.c
@@ -351,7 +351,7 @@ xrep_init_btblock(
xfs_buf_zero(bp, 0, BBTOB(bp->b_length));
xfs_btree_init_block(mp, bp, btnum, 0, 0, sc->sa.agno);
xfs_trans_buf_set_type(tp, bp, XFS_BLFT_BTREE_BUF);
- xfs_trans_log_buf(tp, bp, 0, bp->b_length);
+ xfs_trans_log_buf(tp, bp, 0, BBTOB(bp->b_length) - 1);
bp->b_ops = ops;
*bpp = bp;