From: Eric Sandeen <sandeen@redhat.com>
To: Theodore Tso <tytso@mit.edu>, Eric Sandeen <sandeen@redhat.com>,
Eric Paris <eparis@redhat.com>,
linux-kernel@vger.kernel.org, linux-ext4@vger.kernel.org
Subject: Re: general protection fault: from release_blocks_on_commit
Date: Mon, 27 Oct 2008 21:15:32 -0500 [thread overview]
Message-ID: <490675C4.3040208@redhat.com> (raw)
In-Reply-To: <20081028015228.GA8320@mit.edu>
Theodore Tso wrote:
> I looked at this some more, and at least in theory it could happen
> that we could not have any buffers that need to be checkpointed (so
> t_checkpoint_list and t_checkpoint_io_list are NULL), but there are
> still blocks to be released (or some other users of the jbd2 layer
> still wants to have the callback be called). So I'm currently testing
> this patch (see below).
>
> - Ted
Looks reasonable to me from a correctness perspective, anyway, as long
as holding the j_list_lock over that callback is ok.
It does fix the oops-on-reboot that I could reproduce.
-Eric
> diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c
> index 8b119e1..ebc667b 100644
> --- a/fs/jbd2/commit.c
> +++ b/fs/jbd2/commit.c
> @@ -974,6 +974,9 @@ restart_loop:
> journal->j_committing_transaction = NULL;
> spin_unlock(&journal->j_state_lock);
>
> + if (journal->j_commit_callback)
> + journal->j_commit_callback(journal, commit_transaction);
> +
> if (commit_transaction->t_checkpoint_list == NULL &&
> commit_transaction->t_checkpoint_io_list == NULL) {
> __jbd2_journal_drop_transaction(journal, commit_transaction);
> @@ -995,11 +998,8 @@ restart_loop:
> }
> spin_unlock(&journal->j_list_lock);
>
> - if (journal->j_commit_callback)
> - journal->j_commit_callback(journal, commit_transaction);
> -
> trace_mark(jbd2_end_commit, "dev %s transaction %d head %d",
> - journal->j_devname, commit_transaction->t_tid,
> + journal->j_devname, journal->j_commit_sequence,
> journal->j_tail_sequence);
> jbd_debug(1, "JBD: commit %d complete, head %d\n",
> journal->j_commit_sequence, journal->j_tail_sequence);
next prev parent reply other threads:[~2008-10-28 2:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-21 18:03 general protection fault: from release_blocks_on_commit Eric Paris
2008-10-27 18:19 ` Theodore Tso
2008-10-27 22:26 ` Eric Sandeen
2008-10-27 23:28 ` Theodore Tso
2008-10-28 0:08 ` Eric Sandeen
2008-10-28 1:52 ` Theodore Tso
2008-10-28 2:15 ` Eric Sandeen [this message]
2008-10-28 2:28 ` [PATCH, RFC] jbd2: Call the commit callback before the transaction could get dropped Theodore Tso
2008-10-28 2:41 ` Eric Sandeen
2008-10-28 13:46 ` Eric Paris
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=490675C4.3040208@redhat.com \
--to=sandeen@redhat.com \
--cc=eparis@redhat.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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 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.