Re: [Patch] invalidate range of pages after direct IO write

2005-02-07 Thread Zach Brown
>> But this won't happen if next >>started as 0 and we didn't update it. I don't know if retrying is the >>intended behaviour or if we care that the start == 0 case doesn't do it. > > > Good point. Let's make it explicit? Looks great. I briefly had visions of some bitfield to pack the three b

Re: [Patch] invalidate range of pages after direct IO write

2005-02-04 Thread Andrew Morton
Zach Brown <[EMAIL PROTECTED]> wrote: > > Andrew Morton wrote: > > > I'd be inclined to hold off on the macro until we actually get the > > open-coded stuff right.. Sometimes the page lookup loops take an end+1 > > argument and sometimes they take an inclusive `end'. I think. That might > > mak

Re: [Patch] invalidate range of pages after direct IO write

2005-02-04 Thread Zach Brown
Andrew Morton wrote: > I'd be inclined to hold off on the macro until we actually get the > open-coded stuff right.. Sometimes the page lookup loops take an end+1 > argument and sometimes they take an inclusive `end'. I think. That might > make it a bit messy. > > How's this look? Looks good.

Re: [Patch] invalidate range of pages after direct IO write

2005-02-03 Thread Andrew Morton
Zach Brown <[EMAIL PROTECTED]> wrote: > > > I'll make that change and plop the patch into -mm, but we need to think > > about the infinite-loop problem.. > > I can try hacking together that macro and auditing pagevec_lookup() > callers.. I'd be inclined to hold off on the macro until we actual

Re: [Patch] invalidate range of pages after direct IO write

2005-02-03 Thread Zach Brown
Andrew Morton wrote: > Note that the same optimisation should be made in the call to > unmap_mapping_range() in generic_file_direct_IO(). Currently we try and > unmap the whole file, even if we're only writing a single byte. Given that > you're now calculating iov_length() in there we might as w

Re: [Patch] invalidate range of pages after direct IO write

2005-02-03 Thread Andrew Morton
Zach Brown <[EMAIL PROTECTED]> wrote: > > After a direct IO write only invalidate the pages that the write intersected. > invalidate_inode_pages2_range(mapping, pgoff start, pgoff end) is added and > called from generic_file_direct_IO(). This doesn't break some subtle > agreement > with some othe

[Patch] invalidate range of pages after direct IO write

2005-01-28 Thread Zach Brown
After a direct IO write only invalidate the pages that the write intersected. invalidate_inode_pages2_range(mapping, pgoff start, pgoff end) is added and called from generic_file_direct_IO(). This doesn't break some subtle agreement with some other part of the code, does it? While we're in there