On Wed, 2007-05-30 at 11:35 +0100, David Howells wrote: > Trond Myklebust <[email protected]> wrote: > > > All I do is to protect new calls to read() and write() with a call to > > check if the page cache needs invalidating. > > What about mmap()? What if someone gets a mapping on a section of file that > subsequently has a write rejected on it? If you invalidate only on > read()/write(), what do you do about such a mapping? Same philosophy: The people who already have the file mapped will already be working with corrupted data, so there is little point in bending over backwards to "fix" the problem. Instead we flush out the page cache using invalidate_inode_pages2() whenever someone tries to mmap() a new section of the file. Trond - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- References:
- Re: [PATCH 2/4] AFS: Add a function to excise a rejected write from the pagecache
- From: Trond Myklebust <[email protected]>
- Re: [PATCH 2/4] AFS: Add a function to excise a rejected write from the pagecache
- From: Trond Myklebust <[email protected]>
- Re: [PATCH 2/4] AFS: Add a function to excise a rejected write from the pagecache
- From: Andrew Morton <[email protected]>
- [PATCH 1/4] AFS: Add TestSetPageError()
- From: David Howells <[email protected]>
- [PATCH 2/4] AFS: Add a function to excise a rejected write from the pagecache
- From: David Howells <[email protected]>
- Re: [PATCH 2/4] AFS: Add a function to excise a rejected write from the pagecache
- From: David Howells <[email protected]>
- Re: [PATCH 2/4] AFS: Add a function to excise a rejected write from the pagecache
- From: David Howells <[email protected]>
- Re: [PATCH 2/4] AFS: Add a function to excise a rejected write from the pagecache
- From: David Howells <[email protected]>
- Re: [PATCH 2/4] AFS: Add a function to excise a rejected write from the pagecache
- Prev by Date: Re: [PATCH -mm] 1/2: MMCONFIG: validate against ACPI motherboard resources
- Next by Date: Re: [PATCH -mm] 1/2: MMCONFIG: validate against ACPI motherboard resources
- Previous by thread: Re: [PATCH 2/4] AFS: Add a function to excise a rejected write from the pagecache
- Next by thread: [PATCH 3/4] AFS: Improve handling of a rejected writeback
- Index(es):