[PATCH 17/38] xfs_repair: check metadir superblock padding fields

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Darrick J. Wong <djwong@xxxxxxxxxx>

Since metadir removes sb_bad_features2 from the ondisk superblock, check
that the padding field is zeroed.

Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx>
---
 repair/sb.c |    5 +++++
 1 file changed, 5 insertions(+)


diff --git a/repair/sb.c b/repair/sb.c
index 1320929caee590..80b09225cd97d2 100644
--- a/repair/sb.c
+++ b/repair/sb.c
@@ -479,6 +479,11 @@ verify_sb(char *sb_buf, xfs_sb_t *sb, int is_primary_sb)
 	if (sb->sb_blocklog + sb->sb_dirblklog > XFS_MAX_BLOCKSIZE_LOG)
 		return XR_BAD_DIR_SIZE_DATA;
 
+	if (xfs_sb_version_hasmetadir(sb)) {
+		if (sb->sb_metadirpad)
+			return XR_SB_GEO_MISMATCH;
+	}
+
 	return(XR_OK);
 }
 





[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux