diff mbox series

[16/16] xfs_repair: complain about any nonzero inprogress value, not just 1

Message ID 158904189872.982941.14116905127710550275.stgit@magnolia (mailing list archive)
State Superseded
Headers show
Series xfs_repair: catch things that xfs_check misses | expand

Commit Message

Darrick J. Wong May 9, 2020, 4:31 p.m. UTC
From: Darrick J. Wong <darrick.wong@oracle.com>

Complain about the primary superblock having any non-zero sb_inprogress
value, not just 1.  This brings repair's behavior into alignment with
xfs_check and the kernel.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 repair/sb.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Christoph Hellwig May 10, 2020, 7:27 a.m. UTC | #1
On Sat, May 09, 2020 at 09:31:38AM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> Complain about the primary superblock having any non-zero sb_inprogress
> value, not just 1.  This brings repair's behavior into alignment with
> xfs_check and the kernel.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>
diff mbox series

Patch

diff --git a/repair/sb.c b/repair/sb.c
index 91a36dd3..17ce43cc 100644
--- a/repair/sb.c
+++ b/repair/sb.c
@@ -369,8 +369,7 @@  verify_sb(char *sb_buf, xfs_sb_t *sb, int is_primary_sb)
 		return(XR_BAD_VERSION);
 
 	/* does sb think mkfs really finished ? */
-
-	if (is_primary_sb && sb->sb_inprogress == 1)
+	if (is_primary_sb && sb->sb_inprogress)
 		return(XR_BAD_INPROGRESS);
 
 	/*