From: "Patrick J. LoPresti" <lopresti@gmail.com>
To: ocfs2-devel@oss.oracle.com
Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 2/3] JBD2: Allow feature checks before journal recovery
Date: Thu, 22 Jul 2010 15:04:16 -0700 [thread overview]
Message-ID: <8739vb2mxr.fsf@patl.com> (raw)
In-Reply-To: 874ofr2myq.fsf@patl.com
Before we start accessing a huge (> 16 TiB) OCFS2 volume, we need to
confirm that its journal supports 64-bit offsets. In particular, we
need to check the journal's feature bits before recovering the journal.
This is not possible with JBD2 at present, because the journal
superblock (where the feature bits reside) is not loaded from disk until
the journal is recovered.
This patch loads the journal superblock in
jbd2_journal_check_used_features() if it has not already been loaded,
allowing us to check the feature bits before journal recovery.
Signed-off-by: Patrick LoPresti <lopresti@gmail.com>
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
index bc2ff59..5cfd8d4 100644
--- a/fs/jbd2/journal.c
+++ b/fs/jbd2/journal.c
@@ -1365,6 +1365,10 @@ int jbd2_journal_check_used_features (journal_t *journal, unsigned long compat,
if (!compat && !ro && !incompat)
return 1;
+ /* Load journal superblock if it is not loaded yet. */
+ if (journal->j_format_version == 0 &&
+ journal_get_superblock(journal) != 0)
+ return 0;
if (journal->j_format_version == 1)
return 0;
WARNING: multiple messages have this Message-ID (diff)
From: Patrick J. LoPresti <lopresti@gmail.com>
To: ocfs2-devel@oss.oracle.com
Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [Ocfs2-devel] [PATCH 2/3] JBD2: Allow feature checks before journal recovery
Date: Thu, 22 Jul 2010 15:04:16 -0700 [thread overview]
Message-ID: <8739vb2mxr.fsf@patl.com> (raw)
In-Reply-To: 874ofr2myq.fsf@patl.com
Before we start accessing a huge (> 16 TiB) OCFS2 volume, we need to
confirm that its journal supports 64-bit offsets. In particular, we
need to check the journal's feature bits before recovering the journal.
This is not possible with JBD2 at present, because the journal
superblock (where the feature bits reside) is not loaded from disk until
the journal is recovered.
This patch loads the journal superblock in
jbd2_journal_check_used_features() if it has not already been loaded,
allowing us to check the feature bits before journal recovery.
Signed-off-by: Patrick LoPresti <lopresti@gmail.com>
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
index bc2ff59..5cfd8d4 100644
--- a/fs/jbd2/journal.c
+++ b/fs/jbd2/journal.c
@@ -1365,6 +1365,10 @@ int jbd2_journal_check_used_features (journal_t *journal, unsigned long compat,
if (!compat && !ro && !incompat)
return 1;
+ /* Load journal superblock if it is not loaded yet. */
+ if (journal->j_format_version == 0 &&
+ journal_get_superblock(journal) != 0)
+ return 0;
if (journal->j_format_version == 1)
return 0;
next prev parent reply other threads:[~2010-07-22 22:04 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-22 22:03 [PATCH 1/3] ext3/ext4: Factor out disk addressability check Patrick J. LoPresti
2010-07-22 22:03 ` [Ocfs2-devel] " Patrick J. LoPresti
2010-07-22 22:04 ` Patrick J. LoPresti [this message]
2010-07-22 22:04 ` [Ocfs2-devel] [PATCH 2/3] JBD2: Allow feature checks before journal recovery Patrick J. LoPresti
2010-07-22 22:05 ` [PATCH 3/3] OCFS2: Allow huge (> 16 TiB) volumes to mount Patrick J. LoPresti
2010-07-22 22:05 ` [Ocfs2-devel] " Patrick J. LoPresti
2010-08-12 17:43 ` [Ocfs2-devel] [PATCH 2/3] JBD2: Allow feature checks before journal recovery Joel Becker
2010-08-12 17:43 ` Joel Becker
2010-08-12 23:03 ` Joel Becker
2010-08-12 23:03 ` Joel Becker
2010-08-12 23:03 ` Joel Becker
2010-08-12 23:03 ` [Ocfs2-devel] " Joel Becker
2010-08-12 23:03 ` Joel Becker
2010-08-13 3:39 ` Ted Ts'o
2010-08-13 3:39 ` Ted Ts'o
2010-08-13 7:17 ` Joel Becker
2010-08-13 7:17 ` Joel Becker
2010-08-13 7:17 ` Joel Becker
2010-08-10 15:15 ` [Ocfs2-devel] [PATCH 1/3] ext3/ext4: Factor out disk addressability check Joel Becker
2010-08-10 15:15 ` Joel Becker
2010-08-12 17:42 ` Joel Becker
2010-08-12 17:42 ` Joel Becker
2010-08-12 18:45 ` Andreas Dilger
2010-08-12 18:45 ` Andreas Dilger
2010-08-12 20:15 ` Joel Becker
2010-08-12 20:15 ` Joel Becker
2010-08-12 21:32 ` Andreas Dilger
2010-08-12 21:32 ` Andreas Dilger
2010-08-12 22:29 ` Joel Becker
2010-08-12 22:29 ` Joel Becker
2010-08-12 23:07 ` Andreas Dilger
2010-08-12 23:07 ` Andreas Dilger
2010-08-12 23:13 ` Joel Becker
2010-08-12 23:13 ` Joel Becker
2010-08-13 16:30 ` Jan Kara
2010-08-13 16:30 ` Jan Kara
2010-08-13 20:47 ` Joel Becker
2010-08-13 20:47 ` Joel Becker
2010-08-13 22:52 ` Joel Becker
2010-08-13 22:52 ` Joel Becker
2010-08-16 15:09 ` Jan Kara
2010-08-16 15:09 ` Jan Kara
2010-08-15 17:19 ` Eric Sandeen
2010-08-15 17:19 ` Eric Sandeen
2010-08-16 2:54 ` Joel Becker
2010-08-16 2:54 ` [Ocfs2-devel] " Joel Becker
2010-08-16 3:36 ` Eric Sandeen
2010-08-16 3:36 ` Eric Sandeen
2010-08-16 9:21 ` Joel Becker
2010-08-16 9:21 ` [Ocfs2-devel] " Joel Becker
2010-08-16 14:44 ` Eric Sandeen
2010-08-16 14:44 ` Eric Sandeen
2010-08-16 19:13 ` Joel Becker
2010-08-16 19:13 ` [Ocfs2-devel] " Joel Becker
2010-08-16 19:21 ` Jan Kara
2010-08-16 19:21 ` Jan Kara
2010-08-16 20:45 ` Joel Becker
2010-08-16 20:45 ` [Ocfs2-devel] " Joel Becker
2010-08-16 14:44 ` Eric Sandeen
2010-08-12 23:03 ` Joel Becker
2010-08-12 23:03 ` [Ocfs2-devel] " Joel Becker
2010-08-13 3:39 ` Ted Ts'o
2010-08-13 3:39 ` Ted 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=8739vb2mxr.fsf@patl.com \
--to=lopresti@gmail.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ocfs2-devel@oss.oracle.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.