Linux filesystem development
 help / color / mirror / Atom feed
From: Sukadev Bhattiprolu <sukadev@us.ibm.com>
To: linux-fsdevel@vger.kernel.org
Cc: sukadev@us.ibm.com
Subject: Pagewriteback clarification
Date: Tue, 27 Sep 2005 18:57:38 -0700	[thread overview]
Message-ID: <20050928015738.GA12461@us.ibm.com> (raw)

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

             reply	other threads:[~2005-09-28  1:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-28  1:57 Sukadev Bhattiprolu [this message]
2005-09-28  9:17 ` Pagewriteback clarification Nikita Danilov
2005-09-28 23:57   ` Sukadev Bhattiprolu
2005-09-29  0:24   ` Badari Pulavarty
2005-09-29  8:47     ` Nikita Danilov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050928015738.GA12461@us.ibm.com \
    --to=sukadev@us.ibm.com \
    --cc=linux-fsdevel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox