From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Christoph Hellwig <hch@infradead.org>,
Alexander Viro <viro@ftp.linux.org.uk>,
Andrew Morton <akpm@linux-foundation.org>
Cc: "linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>
Subject: __fsync_super and inode dirty pages
Date: Tue, 5 Aug 2008 23:24:39 +0530 [thread overview]
Message-ID: <20080805175439.GA17772@skywalker> (raw)
Hi,
I am trying to understand the expectation on filesystem
writepages by __fsync_super -> generic_sync_sb_inodes call path.
__fsync_super make two calls to generic_sync_sb_inodes and the
second call is made with WB_SYNC_ALL. The problem is, i am finding
multiple ways we may 'break' from the generic_sync_sb_inodes
while (!list_empty(&sb->s_io)) loop. For ex:
a) When wbc->nr_to_write <=0
This should normally indicate that we wrote more than we requested
That means we have more dirty pages . So why break from loop ?
This may be ok for nr_to_write limited writeback. But is it ok
for __fsync_super ?
b) pages_skipped != wbc->pages_skipped.
That means writepages was not able to write some of the pages
and it redirtied the same. We add such inode to s_dirty list. But
we don't loop through the s_dirty list later trying to write the
dirty pages. We actually call generic_sync_sb_inodes again. That
can actually cause s_dirty list content to move to s_io once
via queue_io. But then we can have pages skipped again in the second
call to generic_sync_sb_inodes ?
Shouldn't we have a variant that actually loop trough s_dirty and s_more_io
list MULTIPLE times and make sure we force all the dirty pages to disk
before __fsync_super returns ? Or is there an expectation from file
system writepages that would make sure calling generic_sync_sb_inodes
TWICE would guarantee that ?
-aneesh
next reply other threads:[~2008-08-05 17:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-05 17:54 Aneesh Kumar K.V [this message]
2008-08-05 18:08 ` __fsync_super and inode dirty pages Aneesh Kumar K.V
2008-08-05 18:13 ` Aneesh Kumar K.V
2008-08-06 1:36 ` Dave Chinner
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=20080805175439.GA17772@skywalker \
--to=aneesh.kumar@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=hch@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=viro@ftp.linux.org.uk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.