RE: Problem with msync system call

From: Gregory Giguashvili (Gregoryg@ParadigmGeo.com)
Date: Tue Jul 23 2002 - 13:00:55 EST


Thanks a lot for your comments.

>I must say I have a very uneasy feeling about such a usage and
>don't know how it is covered by standards (although you claim it works for
non
>linux). Experience shows that such a construct is very
>fragile. Note also that NFS file locking is not mandatory, only advisory
(read:
>user level) and it is unclear how that will interact with mmap.

I agree that the construction is very fragile, but...

- It's been working on a variety of OSes for years... There is no reason for
Linux not to support it as a mature operating system.
- This works for read/write system calls if the file is open with O_SYNC
flag and NFS is mounted using "sync" option.
- There has to be something in the OS that users can do to unconditionally
reread mapped files (no matter if this is NFS or not)
- Even mandatory locking should be sufficient for mmap interaction if one
cares to flush information to the disk before the file is unlocked.
Suprisingly, locking is not the problem here :)

Best,
Giga

-
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/



This archive was generated by hypermail 2b29 : Tue Jul 23 2002 - 22:00:43 EST