[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <452EB9C5.4000404@us.ibm.com>
Date: Thu, 12 Oct 2006 14:55:17 -0700
From: Badari Pulavarty <pbadari@...ibm.com>
To: Eric Sandeen <esandeen@...hat.com>
CC: Andrew Morton <akpm@...l.org>, Jan Kara <jack@...e.cz>,
Eric Sandeen <sandeen@...deen.net>,
Dave Jones <davej@...hat.com>,
Linux Kernel <linux-kernel@...r.kernel.org>
Subject: Re: 2.6.18 ext3 panic.
Eric Sandeen wrote:
> Andrew Morton wrote:
>
>
>> On Thu, 12 Oct 2006 14:28:20 +0200
>> Jan Kara <jack@...e.cz> wrote:
>>
>>
>>
>>> Where can we call
>>> journal_dirty_data() without PageLock?
>>>
>>>
>> block_write_full_page() will unlock the page, so ext3_writepage()
>> will run journal_dirty_data_fn() against an unlocked page.
>>
>> I haven't looked into the exact details of the race, but it should
>> be addressable via jbd_lock_bh_state() or j_list_lock coverage
>>
> I'm testing with something like this now; seem sane?
>
> journal_dirty_data & journal_unmap_data both check do
> jbd_lock_bh_state(bh) close to the top... journal_dirty_data_fn has checked
> buffer_mapped before getting into journal_dirty_data, but that state may
> change before the lock is grabbed. Similarly re-check after we drop the lock.
>
>
This is exactly the solution I proposed earlier (to check
buffer_mapped() before calling submit_bh()).
But at that time, Jan pointed out that the whole handling is wrong.
But if this is the only case we need to handle, I am okay with this band
aid :)
Thanks,
Badari
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists