lkml.org 
[lkml]   [2004]   [Aug]   [19]   [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)?
Marcelo Tosatti <marcelo.tosatti@cyclades.com> wrote:
>
> Hi Andrew,
>
> I dont understand why we do call wait_on_page_writeback_range() with -1
> as the "end" argument.

"every page in the file".

> -1 sounds pretty stupid at first, it does unnecessary calls to
> the radix lookup code.

I guess it could cause one extra call into the lookup code. There's an
additional check in -mm's wait_on_page_writeback_range() which would prevent
that.

> --- a/mm/filemap.c.orig 2004-08-19 14:36:02.000000000 -0300
> +++ b/mm/filemap.c.isize 2004-08-19 18:17:14.000000000 -0300
> @@ -231,7 +231,7 @@
> */
> 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
-
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.030 / U:4.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site