From: Andrew Morton <akpm@osdl.org>
To: Anton Altaparmakov <aia21@cam.ac.uk>
Cc: marcelo.tosatti@cyclades.com, linux-kernel@vger.kernel.org
Subject: Re: filemap_fdatawait() wait_on_page_writeback_range(mapping, 0, -1)?
Date: Fri, 20 Aug 2004 01:36:39 -0700 [thread overview]
Message-ID: <20040820013639.2d9d2206.akpm@osdl.org> (raw)
In-Reply-To: <1092990808.20987.8.camel@imp.csi.cam.ac.uk>
Anton Altaparmakov <aia21@cam.ac.uk> wrote:
>
> > > */
> > > int filemap_fdatawait(struct address_space *mapping)
> > >
> > > - return wait_on_page_writeback_range(mapping, 0, -1);
> > > + return wait_on_page_writeback_range(mapping, 0, i_size_read(mapping->host));
> > > }
> >
> > That would need a >> PAGE_CACHE_SHIFT
>
> Um, what happens to the last partial page? Perhaps this is necessary:
>
> (i_size_read(mapping->host) + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT
/*
* Wait for writeback to complete against pages indexed by start->end
* inclusive
*/
static int wait_on_page_writeback_range(struct address_space *mapping,
pgoff_t start, pgoff_t end)
(start,end) is an inclusive range specifically because of the
do-it-for-the-whole-file requirement.
prev parent reply other threads:[~2004-08-20 8:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-19 20:17 Marcelo Tosatti
2004-08-19 21:49 ` Andrew Morton
2004-08-19 22:13 ` Marcelo Tosatti
2004-08-19 23:33 ` Andrew Morton
[not found] ` <1092990808.20987.8.camel@imp.csi.cam.ac.uk>
2004-08-20 8:36 ` Andrew Morton [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=20040820013639.2d9d2206.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=aia21@cam.ac.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.tosatti@cyclades.com \
/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
all inboxes | Powered by JetHome®