public inbox for linux-fsdevel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@sun.com>
To: Josef Bacik <josef@redhat.com>
Cc: "Cornelius, Martin (DWBI)" <Martin.Cornelius@smiths-heimann.com>,
	linux-fsdevel@vger.kernel.org, "Roeder,
	Patrick (DWBI)" <Patrick.Roeder@smithsdetection.com>
Subject: Re: Question : are concurrent write() calls with O_APPEND on local files atomic ?
Date: Wed, 19 Aug 2009 20:10:05 -0600	[thread overview]
Message-ID: <20090820021005.GZ5931@webber.adilger.int> (raw)
In-Reply-To: <20090819131749.GA7761@localhost.localdomain>

On Aug 19, 2009  09:17 -0400, Josef Bacik wrote:
> > - does this guarantee also hold for remote filesystems (nfs / smb) ?
> 
> This I'm more likely to be wrong on, but I don't think so.  It would be atomic
> on the local machine, but if there is somebody else on another machine writing
> to the same file I think you would probably be screwed.

With NFS at least, there is absolutely no guarantee of any kind when
multiple clients write to the same file, even with non-overlapping
writes (i.e. no O_APPEND, but application seeks to different file
offsets).  That is because an NFS client does not necessarily flush
its local cache until it closes the file.

Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.


  reply	other threads:[~2009-08-20  2:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-19 12:40 Question : are concurrent write() calls with O_APPEND on local files atomic ? Cornelius, Martin (DWBI)
2009-08-19 13:17 ` Josef Bacik
2009-08-20  2:10   ` Andreas Dilger [this message]
2009-08-20 12:28     ` Trond Myklebust
2009-08-20 14:50   ` AW: Question : are concurrent write() calls with O_APPEND on localfiles " Cornelius, Martin (DWBI)
2009-08-20 15:02     ` Josef Bacik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090820021005.GZ5931@webber.adilger.int \
    --to=adilger@sun.com \
    --cc=Martin.Cornelius@smiths-heimann.com \
    --cc=Patrick.Roeder@smithsdetection.com \
    --cc=josef@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox