* [PATCH] xfsprogs: write both features2 fields when xfs_admin changes lazy_count
@ 2010-04-29 2:07 Eric Sandeen
2010-04-29 2:28 ` Dave Chinner
0 siblings, 1 reply; 2+ messages in thread
From: Eric Sandeen @ 2010-04-29 2:07 UTC (permalink / raw)
To: xfs-oss; +Cc: Marcin Mirosław
xfs_admin -c invokes repair directly to change lazy_count,
but it doesn't write both features2 fields, so this:
# mkfs.xfs -dfile,name=fsfile,size=10g -llazy-count=0
# xfs_admin -c 1 fsfile
# xfs_repair fsfile
yields errors.
Reported-by: Marcin Mirosław <marcin@mejor.pl>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
---
diff --git a/repair/phase1.c b/repair/phase1.c
index 618796e..dbfbc9b 100644
--- a/repair/phase1.c
+++ b/repair/phase1.c
@@ -117,11 +117,13 @@ phase1(xfs_mount_t *mp)
if (lazy_count && !xfs_sb_version_haslazysbcount(sb)) {
sb->sb_versionnum |= XFS_SB_VERSION_MOREBITSBIT;
sb->sb_features2 |= XFS_SB_VERSION2_LAZYSBCOUNTBIT;
+ sb->sb_bad_features2 |= XFS_SB_VERSION2_LAZYSBCOUNTBIT;
primary_sb_modified = 1;
printf(_("Enabling lazy-counters\n"));
} else
if (!lazy_count && xfs_sb_version_haslazysbcount(sb)) {
sb->sb_features2 &= ~XFS_SB_VERSION2_LAZYSBCOUNTBIT;
+ sb->sb_bad_features2 &= ~XFS_SB_VERSION2_LAZYSBCOUNTBIT;
printf(_("Disabling lazy-counters\n"));
primary_sb_modified = 1;
} else {
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-04-29 2:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-29 2:07 [PATCH] xfsprogs: write both features2 fields when xfs_admin changes lazy_count Eric Sandeen
2010-04-29 2:28 ` Dave Chinner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox