Messages in this thread | | | Date | Fri, 20 Aug 2004 01:36:39 -0700 | From | Andrew Morton <> | Subject | Re: 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/
| |