On Mar 28, 2007, at 5:18 AM, Richard L. Hamilton wrote:

> and does it vary by filesystem type? I know I ought to know the
> answer, but it's been a long time since I thought about it, and
> I must not be looking at the right man pages.  And also, if it varies,
> how does one tell?  For a pipe, there's fpathconf() with _PC_PIPE_BUF,
> but how about for a regular file?

Are you interested in the NFS client or server?

Generally speaking, clients will submit writes to the
NFS server in either physical page size or 32k sizes.

NFS server implementations will generally write to the
local filesystem in the sizes submitted by the client
but there are varying degrees of optimizations that may
exist that try to collect writes or actually break them
apart.

So, for NFS, there generally isn't any atomic guarantees
from the perspective of write(); the application must
rely on either the classic NFS close-to-open consistency
or instantiate write boundaries with either file locking
or with fsync().

Spencer


Reply via email to