From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: TR Reardon <thomas_reardon@hotmail.com>
Cc: "Theodore Ts'o" <tytso@mit.edu>, linux-ext4@vger.kernel.org
Subject: Re: [PATCH 2/2] jbd2: fix descriptor block size handling errors with journal_csum
Date: Fri, 5 Sep 2014 21:27:34 -0700 [thread overview]
Message-ID: <20140906042734.GA10351@birch.djwong.org> (raw)
In-Reply-To: <20140906040154.GA27293@birch.djwong.org>
On Fri, Sep 05, 2014 at 09:01:54PM -0700, Darrick J. Wong wrote:
> On Tue, Sep 02, 2014 at 03:28:33PM -0400, TR Reardon wrote:
> > There may still be problems with this patch. After applying to 3.16.1, I am now getting "can't enable checksumming v2 and v3 at the same time" errors on mount. Initial mount/dismount work fine, but once fs is touched--forcing superblock update--it cannot be mounted anew.
> >
> > Note results from dumpe2fs (without recent patches)
> >
> > Journal backup: inode blocks
> > Checksum type: crc32c
> > Checksum: 0x39141b69
> > Journal features: journal_incompat_revoke journal_64bit journal_async_commit journal_checksum_v2 FEATURE_I4
> > Journal size: 128M
> > Journal length: 32768
> > Journal sequence: 0x00012aa4
> > Journal start: 0
> > Journal checksum type: crc32c
> > Journal checksum: 0x3952b695
> >
> > Seems that the old v2 flag is not cleared on dismount?
>
> Yep. Thanks for catching this.
Also, would you mind testing this patch? I think it'll suffice to clear all
the journal flags before enabling whichever one we want.
--D
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 0b28b36..aff945d 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -3190,6 +3190,10 @@ static int set_journal_csum_feature_set(struct super_block *sb)
incompat = 0;
}
+ jbd2_journal_clear_features(sbi->s_journal,
+ JBD2_FEATURE_COMPAT_CHECKSUM, 0,
+ JBD2_FEATURE_INCOMPAT_CSUM_V3 |
+ JBD2_FEATURE_INCOMPAT_CSUM_V2);
if (test_opt(sb, JOURNAL_ASYNC_COMMIT)) {
ret = jbd2_journal_set_features(sbi->s_journal,
compat, 0,
@@ -3202,11 +3206,8 @@ static int set_journal_csum_feature_set(struct super_block *sb)
jbd2_journal_clear_features(sbi->s_journal, 0, 0,
JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT);
} else {
- jbd2_journal_clear_features(sbi->s_journal,
- JBD2_FEATURE_COMPAT_CHECKSUM, 0,
- JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT |
- JBD2_FEATURE_INCOMPAT_CSUM_V3 |
- JBD2_FEATURE_INCOMPAT_CSUM_V2);
+ jbd2_journal_clear_features(sbi->s_journal, 0, 0,
+ JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT);
}
return ret;
next prev parent reply other threads:[~2014-09-06 4:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-02 19:28 [PATCH 2/2] jbd2: fix descriptor block size handling errors with journal_csum TR Reardon
2014-09-06 4:01 ` Darrick J. Wong
2014-09-06 4:27 ` Darrick J. Wong [this message]
[not found] ` <BAY179-W502087BB782D5AD3D06197FDC10@phx.gbl>
2014-09-08 15:10 ` TR Reardon
2014-09-08 23:18 ` Darrick J. Wong
-- strict thread matches above, loose matches on Subject: below --
2014-08-15 20:43 [PATCH 0/2] jbd2 checksum-related fixes Darrick J. Wong
2014-08-15 20:43 ` [PATCH 2/2] jbd2: fix descriptor block size handling errors with journal_csum Darrick J. Wong
2014-08-26 2:44 ` Theodore Ts'o
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=20140906042734.GA10351@birch.djwong.org \
--to=darrick.wong@oracle.com \
--cc=linux-ext4@vger.kernel.org \
--cc=thomas_reardon@hotmail.com \
--cc=tytso@mit.edu \
/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;
as well as URLs for NNTP newsgroup(s).