lkml.org 
[lkml]   [2004]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: filemap_fdatawait() wait_on_page_writeback_range(mapping, 0, -1)?
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.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:05    [W:0.049 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site