From: Eric Sandeen <sandeen@sandeen.net>
To: "Marcin Miros?aw" <marcin@mejor.pl>
Cc: xfs@oss.sgi.com
Subject: Re: Enabling lazy counters damages filesystem
Date: Wed, 28 Apr 2010 16:40:08 -0500 [thread overview]
Message-ID: <4BD8AB38.7050004@sandeen.net> (raw)
In-Reply-To: <4BD84771.4030804@mejor.pl>
Marcin Miros?aw wrote:
> Hello,
> Please look at this:
> # mkfs.xfs -f /dev/malowazne/test
> meta-data=/dev/malowazne/test isize=256 agcount=4, agsize=524288 blks
> = sectsz=512 attr=2
> data = bsize=4096 blocks=2097152, imaxpct=25
> = sunit=0 swidth=0 blks
> naming =version 2 bsize=4096 ascii-ci=0
> log =internal log bsize=4096 blocks=2560, version=2
> = sectsz=512 sunit=0 blks, lazy-count=0
> realtime =none extsz=4096 blocks=0, rtextents=0
>
> # xfs_check /dev/malowazne/test
> # xfs_check /dev/malowazne/test
>
> It's still clean.
>
> # xfs_admin -c 1 /dev/malowazne/test
> Enabling lazy-counters
> # xfs_check /dev/malowazne/test
> sb_features2 (0xa) not same as sb_bad_features2 (0x8)
ok, I guess that mechanism is not hitting both sb fields.
Should be a trivial fix, something like below.
-Eric
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
next prev parent reply other threads:[~2010-04-28 21:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-28 14:34 Enabling lazy counters damages filesystem Marcin Mirosław
2010-04-28 21:40 ` Eric Sandeen [this message]
2010-04-28 23:04 ` Dave Chinner
2010-04-29 1:43 ` Dave Chinner
2010-04-29 1:51 ` Eric Sandeen
2010-04-29 2:05 ` Dave Chinner
2010-04-29 8:03 ` Marcin Mirosław
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=4BD8AB38.7050004@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.