From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Curt Wohlgemuth <curtw@google.com>
Cc: Theodore Tso <tytso@mit.edu>,
ext4 development <linux-ext4@vger.kernel.org>
Subject: Re: Questions on ext4 and writeback
Date: Thu, 20 Aug 2009 12:35:35 +0530 [thread overview]
Message-ID: <20090820070535.GA26492@skywalker.linux.vnet.ibm.com> (raw)
In-Reply-To: <6601abe90908180957u6ebe424q878229d2df9ffa94@mail.gmail.com>
On Tue, Aug 18, 2009 at 09:57:49AM -0700, Curt Wohlgemuth wrote:
> Hi Ted:
>
> On Tue, Aug 18, 2009 at 9:39 AM, Theodore Tso<tytso@mit.edu> wrote:
> > On Thu, Aug 13, 2009 at 09:09:58AM -0700, Curt Wohlgemuth wrote:
> >> But the actual submittal of I/O for the previous extent might cause
> >> pages_skipped to be bumped, right? Removing these increments might cause
> >> the accounting to be incorrect, it seems to me.
> >
> > I don't see where the submission of an extent of pages for I/O would
> > cause page_skipped to be incremented or changed --- am I missing
> > something?
>
> Probably not. But it seems to me that a call order of
>
> write_cache_pages -> __mpage_da_writepage -> mpage_da_submit_io ->
> ext4_writepage
>
> can cause pages_skipped to be incremented, either directly in
> ext4_writepage() (page has delayed/unwritted buffers) or in
> __block_write_full_page() (buffer already locked).
>
> In fact, in mpage_da_submit_io(), pages_written is only incremented if
> pages_skipped hasn't been bumped -- so that routine already knows that
> pages_skipped might be changed on I/O submit.
>
> If this happens, ext4_da_writepages() will wipe out the fact that
> pages_skipped was changed during submittal, won't it?
>
In that case we would have set MPAGE_DA_EXTENT_TAIL and we loop again
in the writepages, trying to write again from the beginning and writing the
earlier skipped pages.
In otherwords we retry in writepages untill we are able to write all the
nr_to_write pages.
-aneesh
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2009-08-20 7:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-13 16:09 Questions on ext4 and writeback Curt Wohlgemuth
2009-08-18 16:39 ` Theodore Tso
2009-08-18 16:57 ` Curt Wohlgemuth
2009-08-20 7:05 ` Aneesh Kumar K.V [this message]
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=20090820070535.GA26492@skywalker.linux.vnet.ibm.com \
--to=aneesh.kumar@linux.vnet.ibm.com \
--cc=curtw@google.com \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/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.