From: Theodore Tso <tytso@mit.edu>
To: Duane Griffin <duaneg@dghda.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
"Stephen C. Tweedie" <sct@redhat.com>,
linux-ext4@vger.kernel.org
Subject: Re: jbd2-abort-instead-of-waiting-for-nonexistent-transactions.patch
Date: Sun, 28 Sep 2008 22:24:26 -0400 [thread overview]
Message-ID: <20080929022426.GL8711@mit.edu> (raw)
In-Reply-To: <e9e943910809230956n3f36e544hc46a80c00ff9804a@mail.gmail.com>
On Tue, Sep 23, 2008 at 05:56:27PM +0100, Duane Griffin wrote:
> Stephen suggested that it would be better to sanity check the journal
> start/end pointers on mount, rather than catching the error later like
> this. I never quite convinced myself I'd worked out the right way to
> do that, sorry. Perhaps someone would like to confirm (or otherwise)
> whether or not the following is correct:
>
> In journal_reset (?) check that:
>
> journal->j_first == 1 (this seems to be the only valid value)
>
> and
>
> journal->j_last >= JFS_MIN_JOURNAL_BLOCKS
Yes, for all existing currently created, j_first will be 1. I can't
think of a good reason for why we might want to reserve some space at
the beginning of the journal, but the safest check would be:
(journal->j_last - journal->j_first +1) >= JFS_MIN_JOURNAL_BLOCKS
> Additionally, it should be possible to check the journal->j_last more
> precisely. For internal journals it seems straight-forward, we can
> just check that journal->j_last == inode->i_size >>
> inode->i_sb->s_blocksize_bits. For external journals we'd need to load
> the device's superblock and check journal->j_last == s_blocks_count.
Yep, agreed.
> Regardless, I think the original patch may be a good idea. It improves
> robustness and matches the other locations where we call
> jbd2_log_do_checkpoint. They are all in loops that test that
> journal->j_checkpoint_transactions != NULL.
Agreed. I've included it in the ext4 patch queue, and will be soon
putting out a new ext4 patchset consisting of the patches I plan to
push during the next merge window.
- Ted
next prev parent reply other threads:[~2008-09-29 2:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-22 21:08 jbd2-abort-instead-of-waiting-for-nonexistent-transactions.patch Andrew Morton
2008-09-23 16:56 ` jbd2-abort-instead-of-waiting-for-nonexistent-transactions.patch Duane Griffin
2008-09-29 2:24 ` Theodore Tso [this message]
2008-09-29 16:51 ` jbd2-abort-instead-of-waiting-for-nonexistent-transactions.patch Duane Griffin
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=20080929022426.GL8711@mit.edu \
--to=tytso@mit.edu \
--cc=akpm@linux-foundation.org \
--cc=duaneg@dghda.com \
--cc=linux-ext4@vger.kernel.org \
--cc=sct@redhat.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;
as well as URLs for NNTP newsgroup(s).