From: Dave Chinner <david@fromorbit.com>
To: Michael Monnerie <michael.monnerie@is.it-management.at>
Cc: Christoph Hellwig <hch@infradead.org>,
Zhu Han <schumi.han@gmail.com>,
xfs@oss.sgi.com
Subject: Re: Directory fsync
Date: Mon, 26 Sep 2011 10:28:11 +1000 [thread overview]
Message-ID: <20110926002811.GA3159@dastard> (raw)
In-Reply-To: <201109240109.45532@zmi.at>
On Sat, Sep 24, 2011 at 01:09:44AM +0200, Michael Monnerie wrote:
> On Freitag, 23. September 2011 Christoph Hellwig wrote:
> > As far as standards are concerned it is. As far as the current XFS
> > implementation is concerned you don't need it as the file fsync will
> > also force out all transactions that belong to the create.
>
> Aren't you giving O_PONIES to the users? ;-)
>
> I understand your description, but we should always tell people to use a
> directory fsync to be sure. Their applications might run on other
> filesystems, or run for 10 years, and maybe XFS's implementation changes
> in between. And maybe in historical kernels even XFS's implementation
> wasn't like it's now?
XFS's journalling has always behaved this way - *all* transactions
prior to the fsync() triggered log force are guaranteed to be on
disk once the fsync completes. There are no plans to change this
behaviour, either, because we rely on this architectural
characteristic to provide strong ordering of metadata operations in
many places.
All it means is that the directory fsync() is a no-op that only
costs CPU time.
> @schumi: If your application should be able to run in a safe way on
> other filesystems, or other kernel releases, or other unixes, it's best
> to fsync the directory inode too. It's better to use it always, then
> nothing won't break.
*nod*
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2011-09-26 0:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-23 15:12 Directory fsync Zhu Han
2011-09-23 16:33 ` Christoph Hellwig
2011-09-23 23:09 ` Michael Monnerie
2011-09-24 1:20 ` Zhu Han
2011-10-01 23:20 ` Peter Grandi
2011-09-26 0:28 ` Dave Chinner [this message]
2011-09-26 0:51 ` Christoph Hellwig
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=20110926002811.GA3159@dastard \
--to=david@fromorbit.com \
--cc=hch@infradead.org \
--cc=michael.monnerie@is.it-management.at \
--cc=schumi.han@gmail.com \
--cc=xfs@oss.sgi.com \
/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