Re: invalidate_inode_pages() and mmap()

From: Stephen C. Tweedie (sct@redhat.com)
Date: Mon May 01 2000 - 06:58:15 EST


Hi,

On Fri, Apr 28, 2000 at 12:25:22PM +0200, Trond Myklebust wrote:
> >>>>> " " == Andrea Arcangeli <andrea@suse.de> writes:
> > note that when a mapped page-cache is unlinked from the cache
> > it doesn't become anonymous, but it's still a shared page or
> > private mapping for the process. The only difference will
>
> IMHO the way to fix this is by making invalidate_inode_pages() aware
> of file locking.

No, there isn't such a thing as a lock on a region of a file. There
is just byte-range locking, but the range being covered by locks is
not tightly coupled to the contents of the file. In particular,
you can quite legally hold byte range locks beyond the end of the file.

Since the locks are purely advisory, and don't interact with _any_
file content manipulation operations, there should be absolutely
no interaction between invalidate_inode_pages() and any file
locks in general.

NFS will have specific requirements to do with file locking, but I
really wouldn't want to see the generic VFS filemap functions have
to learn anything about that.

--Stephen

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



This archive was generated by hypermail 2b29 : Sun May 07 2000 - 21:00:08 EST