Skip to content

Commit f3d7ebd

Browse files
Dave Chinnerdchinner
authored andcommitted
xfs: fix superblock inprogress check
From inspection, the superblock sb_inprogress check is done in the verifier and triggered only for the primary superblock via a "bp->b_bn == XFS_SB_DADDR" check. Unfortunately, the primary superblock is an uncached buffer, and hence it is configured by xfs_buf_read_uncached() with: bp->b_bn = XFS_BUF_DADDR_NULL; /* always null for uncached buffers */ And so this check never triggers. Fix it. cc: <[email protected]> Signed-off-by: Dave Chinner <[email protected]> Reviewed-by: Brian Foster <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Dave Chinner <[email protected]>
1 parent 5b5c2db commit f3d7ebd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/xfs/libxfs/xfs_sb.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,8 @@ xfs_sb_verify(
583583
* Only check the in progress field for the primary superblock as
584584
* mkfs.xfs doesn't clear it from secondary superblocks.
585585
*/
586-
return xfs_mount_validate_sb(mp, &sb, bp->b_bn == XFS_SB_DADDR,
586+
return xfs_mount_validate_sb(mp, &sb,
587+
bp->b_maps[0].bm_bn == XFS_SB_DADDR,
587588
check_version);
588589
}
589590

0 commit comments

Comments
 (0)