[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGW2f1EaVQMQn37QPmzhMZiWUD=oqLTGoFQe=ZteHUUxpQbNCw@mail.gmail.com>
Date: Tue, 15 Oct 2013 15:54:18 -0400
From: jon ernst <jonernst07@...il.com>
To: Lukáš Czerner <lczerner@...hat.com>
Cc: Jan Kara <jack@...e.cz>, Ted Tso <tytso@....edu>,
"linux-ext4@...r.kernel.org List" <linux-ext4@...r.kernel.org>
Subject: Re: [PATCH 1/2] ext4: Fix assertion in ext4_add_complete_io()
On Tue, Oct 15, 2013 at 1:20 PM, Lukáš Czerner <lczerner@...hat.com> wrote:
> On Tue, 15 Oct 2013, Jan Kara wrote:
>
>> Date: Tue, 15 Oct 2013 15:32:28 +0200
>> From: Jan Kara <jack@...e.cz>
>> To: Ted Tso <tytso@....edu>
>> Cc: linux-ext4@...r.kernel.org, Jan Kara <jack@...e.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@...hat.com>
>
>>
>> Reported-by: Eric Whitney <enwlinux@...il.com>
>> Signed-off-by: Jan Kara <jack@...e.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. :)
>> spin_lock_irqsave(&ei->i_completed_io_lock, flags);
>> - wq = EXT4_SB(io_end->inode->i_sb)->rsv_conversion_wq;
>> + wq = sbi->rsv_conversion_wq;
>> if (list_empty(&ei->i_rsv_conversion_list))
>> queue_work(wq, &ei->i_rsv_conversion_work);
>> list_add_tail(&io_end->list, &ei->i_rsv_conversion_list);
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists