lkml.org 
[lkml]   [2000]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: The INN/mmap bug


On Mon, 18 Sep 2000, Alexander Viro wrote:

> On Sun, 17 Sep 2000, Linus Torvalds wrote:
>
> > At that point, block_write_full_page() would become something like
> >
> > unsigned long index = inode->i_size >> PAGE_CACHE_SHIFT;
> >
> > offset = inode->i_size & (PAGE_CACHE_SIZE-1);
> > if (index > page->index)
> > offset = PAGE_CACHE_SIZE;
> >
> > create_empty_buffers(page, 0, offset);
> > for_each_buffer(page) {
> > if (buffer_mapped(bh))
> > mark_buffer_dirty(bh);
> > }
> >
> > which would certainly be simpler than the current code. Hmm.
>
> At that point it will become prepare_write+commit_write. Which may be a
> good thing in many other respects. I wonder if we need the
> ->writepage() at all - I seriosuly suspect that the reason why I didn't
> kill it back when I added ->prepare_write() was that I _did_ stumble on
> that bug with reads and didn't realize that.

Nope. NFS does things differently in cases of write and pageout.
Ouch. On the write path for local filesystems we generally ignore O_SYNC
for data. And IMO that's firmly on the "must be fixed before
2.4-final" side. Possibly by sync/async flag for ->commit_write()...

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

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