Skip to contentSkip to conversation

O_SYNC option doesn't work (2.4.18-3)

DISCUSSION Jesse Pollard 1 participant 1 message Aug 8, 2002

lore
Share & tools
lore
#0 lore raw

--------- Received message begins Here ---------

Quoted 14 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

" " == Gregory Giguashvili <[email protected]> writes:

> When the writer closes the file, how do you make the readers > see the latest changes (assuming that you always open/close > files per transaction type).

There is a convention amongst NFS clients that each client will always flush *all* changes to the server upon close(), and it will always check the file attributes upon a call to open() (and if the mtime or file size have changed, one flushes the page cache).
This suffices to guarantee file cache consistency *provided* that only one client opens the file at any given time.

Quoted 3 lines

If locking is used, all changes are flushed to the server upon taking/releasing a lock, and the page cache is guaranteed to get flushed upon taking a lock.

And remember- this depends entirely on the server working the way lockd assumes. Some systems DON'T do this anyway, since locks are not necessarily available except on the local system, and not on the server.

Even when they are available, race conditions will/can still void the assumptions.

-------------------------------------------------------------------------
Jesse I Pollard, II
Email: [email protected]

Any opinions expressed are solely my own.