F_SETLK sorry.
You need to do it on both reader and writer. On the writer it acts
like a fsync(), on the reader it should clear the cache.
I think the problem in your case is that you have the pages mmaped.
NFS uses invalidate_inode_pages() to throw away the cache, but that
doesn't work when the pages are mapped. It may work to munmap/mmap
around the locking.
In theory with rmap (=2.5) the kernel could do that unmap/remap for you,
but it will be probably non trivial to implement.
-Andi
-
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/