public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* NFS file consistency
@ 2003-03-17 14:50 jlnance
  2003-03-17 15:00 ` Trond Myklebust
  0 siblings, 1 reply; 2+ messages in thread
From: jlnance @ 2003-03-17 14:50 UTC (permalink / raw)
  To: linux-kernel

Hello All,
    I am trying to track down some file consistency problems I am seeing
and I want to make sure my assumptions about NFS are correct.
    Say I have 2 NFS clients, machine A and machine B.  Machine A does
an open/write/close on a file.  After this machine B does an open/read on
the file.  Is machine B guaranteed to read the same data that A wrote
or is there a delay between the time A closes the file and the time B
can expect to see valid data?  Also if the file already existed before
A wrote it, and B had already read from it and closed it, does this
affect anything?

Thanks,

Jim

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: NFS file consistency
  2003-03-17 14:50 NFS file consistency jlnance
@ 2003-03-17 15:00 ` Trond Myklebust
  0 siblings, 0 replies; 2+ messages in thread
From: Trond Myklebust @ 2003-03-17 15:00 UTC (permalink / raw)
  To: jlnance; +Cc: linux-kernel

>>>>> " " == jlnance  <jlnance@unity.ncsu.edu> writes:

     > Hello All,
     >     I am trying to track down some file consistency problems I
     >     am seeing
     > and I want to make sure my assumptions about NFS are correct.
     >     Say I have 2 NFS clients, machine A and machine B.  Machine
     >     A does
     > an open/write/close on a file.  After this machine B does an
     > open/read on the file.  Is machine B guaranteed to read the
     > same data that A wrote or is there a delay between the time A
     > closes the file and the time B can expect to see valid data?

No delay should be necessary. Machine B should see the data that A
wrote.

     > Also if the file already existed before A wrote it, and B had
     > already read from it and closed it, does this affect anything?

Nope.

However the Linux 2.4.x NFS server has a known bug/feature that may
affect things: because the mtime only has a 1 second resolution,
changes that occur within < 1 second of one another may not cause
mtime to be updated.  When this occurs, the NFS client has no way to
tell that the file has changed.
This limitation no longer exists in Linux 2.5.x...

Cheers,
  Trond

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-03-17 14:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-17 14:50 NFS file consistency jlnance
2003-03-17 15:00 ` Trond Myklebust

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox