Skip to contentSkip to conversation

xfsprogs: sb_meta_uuid fixes

PATCH In review Dave Chinner 2 participants 5 messages Aug 3, 2015

lore
Share & tools
lore
#0 lore raw

cover xfsprogs: sb_meta_uuid fixes

HI folks,

THis is the userspace side fixes that I've needed to make to get xfstests to pass without regressions with a modified sb_meta_uuid. Same circumstances as the kernel side patches I just sent....

Cheers,

Dave.

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#1 lore raw

PATCH 1/2 repair: use sb_meta_uuid for checking of metadata headers

From: Dave Chinner <[email protected]>

Now that we can change the uuid on v5 filesystems, we always need to verify the metadata uuid against sb_meta_uuid, not sb_uuid. This fixes quite a few xfstests failures when UUIDs are changed before executing tests.

---
 repair/phase6.c | 2 +-
 repair/scan.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
repair/phase6.c +1 -1
index 09da2e2..ad9be38 100644
@@ -1960,7 +1960,7 @@ _("expected block %" PRIu64 ", got %llu, directory inode %" PRIu64 "\n"),
 		return 1;
 	}
 	/* verify uuid */
-	if (platform_uuid_compare(uuid, &mp->m_sb.sb_uuid) != 0) {
+	if (platform_uuid_compare(uuid, &mp->m_sb.sb_meta_uuid) != 0) {
 		do_warn(
 _("wrong FS UUID, directory inode %" PRIu64 " block %" PRIu64 "\n"),
 			ino, bp->b_bn);
repair/scan.c +1 -1
index 8711b94..95b8ade 100644
@@ -237,7 +237,7 @@ _("expected block %" PRIu64 ", got %llu, bmbt block %" PRIu64 "\n"),
 		}
 		/* verify uuid */
 		if (platform_uuid_compare(&block->bb_u.l.bb_uuid,
-					  &mp->m_sb.sb_uuid) != 0) {
+					  &mp->m_sb.sb_meta_uuid) != 0) {
 			do_warn(
 _("wrong FS UUID, bmbt block %" PRIu64 "\n"),
 				bno);
Signature · 6 lines
2.1.4

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
#3 lore raw

PATCH 2/2 libxfs: fix uuid check durign inode allocation

In reply to Dave Chinner

From: Dave Chinner <[email protected]>

Needs to check sb_meta_uuid now that we the sb_uuid can change on v5 filesystems.

---
 libxfs/util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
libxfs/util.c +1 -1
index 719a5b7..f427d22 100644
@@ -262,7 +262,7 @@ libxfs_ialloc(
 
 	if (ip->i_d.di_version == 3) {
 		ASSERT(ip->i_d.di_ino == ino);
-		ASSERT(uuid_equal(&ip->i_d.di_uuid, &mp->m_sb.sb_uuid));
+		ASSERT(uuid_equal(&ip->i_d.di_uuid, &mp->m_sb.sb_meta_uuid));
 		ip->i_d.di_crc = 0;
 		ip->i_d.di_changecount = 1;
 		ip->i_d.di_lsn = 0;
Signature · 6 lines
2.1.4

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Reviewed-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] repair: use sb_meta_uuid for checking of metadata headers

In reply to Dave Chinner
Quoted 8 lines · Dave Chinner

From: Dave Chinner <[email protected]>

Now that we can change the uuid on v5 filesystems, we always need to verify the metadata uuid against sb_meta_uuid, not sb_uuid. This fixes quite a few xfstests failures when UUIDs are changed before executing tests.

I have no plausible excuse for this one... ;)

Quoted 24 lines
---
 repair/phase6.c | 2 +-
 repair/scan.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
repair/phase6.c +1 -1
index 09da2e2..ad9be38 100644
@@ -1960,7 +1960,7 @@ _("expected block %" PRIu64 ", got %llu, directory inode %" PRIu64 "\n"),
 		return 1;
 	}
 	/* verify uuid */
-	if (platform_uuid_compare(uuid, &mp->m_sb.sb_uuid) != 0) {
+	if (platform_uuid_compare(uuid, &mp->m_sb.sb_meta_uuid) != 0) {
 		do_warn(
 _("wrong FS UUID, directory inode %" PRIu64 " block %" PRIu64 "\n"),
 			ino, bp->b_bn);
repair/scan.c +0 -0
index 8711b94..95b8ade 100644

repair/scan.c _("expected block %" PRIu64 ", got %llu, bmbt block %" PRIu64 "\n"), · line 243

Quoted 8 lines
repair/scan.c +1 -1
@@ -237,7 +237,7 @@ _("expected block %" PRIu64 ", got %llu, bmbt block %" PRIu64 "\n"),
 		}
 		/* verify uuid */
 		if (platform_uuid_compare(&block->bb_u.l.bb_uuid,
-					  &mp->m_sb.sb_uuid) != 0) {
+					  &mp->m_sb.sb_meta_uuid) != 0) {
 			do_warn(
 _("wrong FS UUID, bmbt block %" PRIu64 "\n"),
 				bno);

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

Reviewed-by on v1 2/2
#4 lore raw

Re: [PATCH 2/2] libxfs: fix uuid check durign inode allocation

In reply to Dave Chinner
Quoted 6 lines · Dave Chinner

From: Dave Chinner <[email protected]>

Needs to check sb_meta_uuid now that we the sb_uuid can change on v5 filesystems.

ASSERTs are off in libxfs anyway right? Still:

Quoted 10 lines
---
 libxfs/util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
libxfs/util.c +0 -0
index 719a5b7..f427d22 100644

libxfs/util.c libxfs_ialloc( · line 268

Quoted 8 lines
libxfs/util.c +1 -1
@@ -262,7 +262,7 @@ libxfs_ialloc(
 
 	if (ip->i_d.di_version == 3) {
 		ASSERT(ip->i_d.di_ino == ino);
-		ASSERT(uuid_equal(&ip->i_d.di_uuid, &mp->m_sb.sb_uuid));
+		ASSERT(uuid_equal(&ip->i_d.di_uuid, &mp->m_sb.sb_meta_uuid));
 		ip->i_d.di_crc = 0;
 		ip->i_d.di_changecount = 1;
 		ip->i_d.di_lsn = 0;

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs