[lkml]   [2002]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: fsync fixes for 2.4

    On Wed, 10 Jul 2002, Andrea Arcangeli wrote:

    > At polyserve they found a severe problem with fsync in 2.4.
    > In short the write_buffer (ll_rw_block of mainline) is a noop if old I/O
    > is in flight. You know the buffer can be made dirty while I/O is in
    > flight, and in such case fsync would return without flushing the dirty
    > buffers at all. Their proposed fix is strightforward, just a
    > wait_on_buffer before the ll_rw_block will guarantee somebody marked the
    > bh locked _after_ we wrote to it.

    From what I can see the problem goes like:

    thread1 thread2
    writepage(page) (marks the buffers clean, page is
    locked for IO)



    fsync_buffers_list() finds
    the dirtied buffer, but since
    its locked ll_rw_block() returns
    without queueing the data.

    fsync_buffers_list() waits on the writepage()'s
    write to return but not on latest data write.

    Is that what you mean or I'm misunderstanding something?

    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 13:27    [W:0.023 / U:57.924 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site