Linux filesystem development
 help / color / mirror / Atom feed
* Pagewriteback clarification
@ 2005-09-28  1:57 Sukadev Bhattiprolu
  2005-09-28  9:17 ` Nikita Danilov
  0 siblings, 1 reply; 5+ messages in thread
From: Sukadev Bhattiprolu @ 2005-09-28  1:57 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: sukadev

Hi,

I have a couple of questions regarding PageWriteback flag and its
relationship to locked buffers and in-progress I/O in progress.
I would appreciate any input/pointers on this.

1.  Based on documentation in Documentation/filesystems/filesystems
    (LK 2.6.13), .writepage() can be called even if I/O is in progress
    for the page.  And if an I/O is in progress, PageWriteback is TRUE
    for the page.
    
    Then, can a filesystem's .writepage simply rely on PageWriteback flag
    to determine if I/O is currently in progress ? (ext3/reiser etc seem
    to use test_set_buffer_locked() to determine if I/O is in progress)
    
2. __block_write_full_page() has following lines of code:

    In a do..while() loop:

       if (wbc->sync_mode != WB_SYNC_NONE || !wbc->nonblocking) {
            lock_buffer(bh);
        } else if (test_set_buffer_locked(bh)) {
            redirty_page_for_writepage(wbc, page);
            continue;
        }

    and immediately after the loop is following BUG_ON().

        BUG_ON(PageWriteback(page));

    The test_set_buffer_locked(bh) appears to be testing for in-progress
    I/O and if TRUE redirties the page.

    But if a sync I/O is in progress for the page for instance, would
    PageWriteback not be TRUE ?

Thanks,

Sukadev

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-09-29  8:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-28  1:57 Pagewriteback clarification Sukadev Bhattiprolu
2005-09-28  9:17 ` Nikita Danilov
2005-09-28 23:57   ` Sukadev Bhattiprolu
2005-09-29  0:24   ` Badari Pulavarty
2005-09-29  8:47     ` Nikita Danilov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox