[lkml]   [2004]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: writepages drops bh on not uptodate page
    On Wed, Jul 28, 2004 at 09:03:39AM -0400, Chris Mason wrote:
    > Ahhhh, this really explains it, thanks andrea. I agree your fix should
    > solve things, but I'm wondering if we shouldn't make readpage[s] do a
    > wait_on_page_writeback(). That might do a better job of protecting us
    > from future variations of this problem.

    the invariant is that not-fully-uptodate pages needs the bh on them
    while they're under writeback. As far as this holds true, there seems
    not to be other issues since readpage checks the bh, and readpages don't
    need to check for anything since it only does I/O on newly allocated
    pages (which cannot be under writeback). try_to_free_buffers doesn't
    allow the bh to go away under writeback.

    So the other approach would be to wait_on_page_writeback before a
    ->readpage (not ->readpages), if we're not in a add_to_page_cache case
    (where we know the page cannot be under writeback). But that looks less
    efficient and we don't need that as long as we don't break the above
    invariant. Though I certainly agree that adding the
    wait_on_page_writeback in the highlevel code that goes to call readpage
    would have fixed the bug too.
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 14:04    [W:0.021 / U:8.660 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site