linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: jon ernst <jonernst07@gmail.com>
Cc: "Lukáš Czerner" <lczerner@redhat.com>, "Jan Kara" <jack@suse.cz>,
	"Ted Tso" <tytso@mit.edu>,
	"linux-ext4@vger.kernel.org List" <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH 1/2] ext4: Fix assertion in ext4_add_complete_io()
Date: Wed, 16 Oct 2013 14:01:39 +0200	[thread overview]
Message-ID: <20131016120139.GA14278@quack.suse.cz> (raw)
In-Reply-To: <CAGW2f1EaVQMQn37QPmzhMZiWUD=oqLTGoFQe=ZteHUUxpQbNCw@mail.gmail.com>

On Tue 15-10-13 15:54:18, jon ernst wrote:
> On Tue, Oct 15, 2013 at 1:20 PM, Lukáš Czerner <lczerner@redhat.com> wrote:
> > On Tue, 15 Oct 2013, Jan Kara wrote:
> >
> >> Date: Tue, 15 Oct 2013 15:32:28 +0200
> >> From: Jan Kara <jack@suse.cz>
> >> To: Ted Tso <tytso@mit.edu>
> >> Cc: linux-ext4@vger.kernel.org, Jan Kara <jack@suse.cz>
> >> Subject: [PATCH 1/2] ext4: Fix assertion in ext4_add_complete_io()
> >>
> >> It doesn't make sense to require io_end->handle when we are in nojournal
> >> mode. So update the assertion accordingly to avoid false warnings from
> >> ext4_add_complete_io().
> >
> > Looks good.
> >
> > Reviewed-by: Lukas Czerner <lczerner@redhat.com>
> >
> >>
> >> Reported-by: Eric Whitney <enwlinux@gmail.com>
> >> Signed-off-by: Jan Kara <jack@suse.cz>
> >> ---
> >>  fs/ext4/page-io.c | 5 +++--
> >>  1 file changed, 3 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/fs/ext4/page-io.c b/fs/ext4/page-io.c
> >> index d7d0c7b46ed4..d488f80ee32d 100644
> >> --- a/fs/ext4/page-io.c
> >> +++ b/fs/ext4/page-io.c
> >> @@ -197,14 +197,15 @@ static void dump_completed_IO(struct inode *inode, struct list_head *head)
> >>  static void ext4_add_complete_io(ext4_io_end_t *io_end)
> >>  {
> >>       struct ext4_inode_info *ei = EXT4_I(io_end->inode);
> >> +     struct ext4_sb_info *sbi = EXT4_SB(io_end->inode->i_sb);
> >>       struct workqueue_struct *wq;
> >>       unsigned long flags;
> >>
> >>       /* Only reserved conversions from writeback should enter here */
> >>       WARN_ON(!(io_end->flag & EXT4_IO_END_UNWRITTEN));
> >> -     WARN_ON(!io_end->handle);
> >> +     WARN_ON(!io_end->handle && sbi->s_journal);
> 
> swap 2 conditions would be better in my opinion.   (for no-journal
> case, it will be short-circuited. For journal case, no harm, no
> difference.)
> i know this is too picky. :)
  OTOH you will check sbi->s_journal unnecessarily for the more common
case when the journal is enabled. But I don't care tham much really.

								Honza

-- 
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-10-16 12:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-15 13:32 [PATCH 1/2] ext4: Fix assertion in ext4_add_complete_io() Jan Kara
2013-10-15 13:32 ` [PATCH 2/2] ext4: Fixup kerndoc annotation of mpage_map_and_submit_extent() Jan Kara
2013-10-17  3:31   ` Theodore Ts'o
2013-10-15 15:37 ` [PATCH 1/2] ext4: Fix assertion in ext4_add_complete_io() Eric Whitney
2013-10-15 17:20 ` Lukáš Czerner
2013-10-15 19:54   ` jon ernst
2013-10-16 12:01     ` Jan Kara [this message]
2013-10-17  3:31 ` 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=20131016120139.GA14278@quack.suse.cz \
    --to=jack@suse.cz \
    --cc=jonernst07@gmail.com \
    --cc=lczerner@redhat.com \
    --cc=linux-ext4@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 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).