Messages in this thread | | | Date | Tue, 23 Jul 2002 20:06:04 +0200 | From | Andi Kleen <> | Subject | Re: Problem with msync system call |
| |
On Tue, Jul 23, 2002 at 08:45:07PM +0200, Gregory Giguashvili wrote: > >Do a F_SETFL lock/unlock on the file That should act as a > >full NFS write barrier and flush all buffers. Best is if you synchronize > >between the various writers with the full lock. > > Do you mean F_SETLK? If so, this didn't help (the source is attached).
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/
| |