linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Monakhov <dmonakhov@openvz.org>
To: Jan Kara <jack@suse.cz>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH 3/4] jbd2: make shure that we do not miss aborted state
Date: Wed, 22 May 2013 13:02:10 +0400	[thread overview]
Message-ID: <87mwrn75gt.fsf@openvz.org> (raw)
In-Reply-To: <20130521162114.GF11616@quack.suse.cz>

On Tue, 21 May 2013 18:21:14 +0200, Jan Kara <jack@suse.cz> wrote:
> On Thu 16-05-13 16:28:09, Dmitry Monakhov wrote:
> > 
> > Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
>   Can you elaborate a bit more on how the aborted state could be missed so
> that it would cause any problems?
Fairly to say this was fix of hypothetical issue.
Since we  j_state_lock goes trough lock/unlock after wait_event()
we should not miss an error for the certain tid we are interested in.
But this patch makes code looks cleaner. 
> 
> 								Honza
> > ---
> >  fs/jbd2/journal.c |    3 +--
> >  1 files changed, 1 insertions(+), 2 deletions(-)
> > 
> > diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
> > index 886ec2f..57b9120 100644
> > --- a/fs/jbd2/journal.c
> > +++ b/fs/jbd2/journal.c
> > @@ -700,12 +700,11 @@ int jbd2_log_wait_commit(journal_t *journal, tid_t tid)
> >  				!tid_gt(tid, journal->j_commit_sequence));
> >  		read_lock(&journal->j_state_lock);
> >  	}
> > -	read_unlock(&journal->j_state_lock);
> > -
> >  	if (unlikely(is_journal_aborted(journal))) {
> >  		printk(KERN_EMERG "journal commit I/O error\n");
> >  		err = -EIO;
> >  	}
> > +	read_unlock(&journal->j_state_lock);
> >  	return err;
> >  }
> >  
> > -- 
> > 1.7.1
> > 
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> -- 
> Jan Kara <jack@suse.cz>
> SUSE Labs, CR
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2013-05-22  9:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-16 12:28 [PATCH 1/4] ext4: Fix fsync error handling after filesysteb abort Dmitry Monakhov
2013-05-16 12:28 ` [PATCH 2/4] ext3: " Dmitry Monakhov
2013-05-16 12:28 ` [PATCH 3/4] jbd2: make shure that we do not miss aborted state Dmitry Monakhov
2013-05-16 12:35   ` Wang Shilong
2013-05-21 16:21   ` Jan Kara
2013-05-22  9:02     ` Dmitry Monakhov [this message]
2013-05-24 13:09       ` Jan Kara
2013-05-16 12:28 ` [PATCH 4/4] jbd: " Dmitry Monakhov
2013-05-21 16:18 ` [PATCH 1/4] ext4: Fix fsync error handling after filesysteb abort Jan Kara

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=87mwrn75gt.fsf@openvz.org \
    --to=dmonakhov@openvz.org \
    --cc=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    /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).