RE: Problem with msync system call

Gregory Giguashvili (Gregoryg@ParadigmGeo.com)
Tue, 23 Jul 2002 20:00:55 +0200


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/