public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: xfs-oss <xfs@oss.sgi.com>
Cc: "Marcin Mirosław" <marcin@mejor.pl>
Subject: [PATCH] xfsprogs: write both features2 fields when xfs_admin changes lazy_count
Date: Wed, 28 Apr 2010 21:07:52 -0500	[thread overview]
Message-ID: <4BD8E9F8.4090701@sandeen.net> (raw)

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

             reply	other threads:[~2010-04-29  2:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-29  2:07 Eric Sandeen [this message]
2010-04-29  2:28 ` [PATCH] xfsprogs: write both features2 fields when xfs_admin changes lazy_count Dave Chinner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BD8E9F8.4090701@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=marcin@mejor.pl \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox