Re: [PATCH] zerocopy NFS updated

Keith Owens
2002-04-14T00:08:08Z

On Sat, 13 Apr 2002 11:52:49 -0700,
Chris Wedgwood <cw@f00f.org> wrote:
>On Fri, Apr 12, 2002 at 02:31:50PM -0700, David S. Miller wrote:
>
> If you need to depend upon a consistent snapshot of what some
> other thread writes into a file, you must have some locking
> protocol to use to synchronize with that other thread.
>
>Appends of small-writes (for whatever reason) seems to be atomic,
>AFAIK nobody gets corrupt apache logs for example.

Write in append mode must be atomic in the kernel. Whether a user
space write in append mode is atomic or not depends on how many write()
syscalls it takes to pass the data into the kernel. Each write()
append will be atomic but multiple writes can be interleaved.