]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_repair: zero shared_vn
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 26 Jan 2017 02:02:43 +0000 (20:02 -0600)
committerEric Sandeen <sandeen@redhat.com>
Thu, 26 Jan 2017 02:02:43 +0000 (20:02 -0600)
Since shared_vn always has to be zero, zero it at the start of repair.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
repair/phase1.c

index 126d0b35b038f14780fa4b4228ccfbc3b6d9e41a..97998831432b5b03d179d6a280f2ff558218fa81 100644 (file)
@@ -138,6 +138,13 @@ _("Cannot disable lazy-counters on V5 fs\n"));
                }
        }
 
+       /* shared_vn should be zero */
+       if (sb->sb_shared_vn) {
+               do_warn(_("resetting shared_vn to zero\n"));
+               sb->sb_shared_vn = 0;
+               primary_sb_modified = 1;
+       }
+
        if (primary_sb_modified)  {
                if (!no_modify)  {
                        do_warn(_("writing modified primary superblock\n"));