From: Christoph Hellwig <hch@infradead.org>
To: Sage Weil <sweil@redhat.com>
Cc: Somnath.Roy@sandisk.com, ceph-devel@vger.kernel.org, sjust@redhat.com
Subject: Re: FileStore should not use syncfs(2)
Date: Thu, 6 Aug 2015 06:06:36 -0700 [thread overview]
Message-ID: <20150806130636.GA20436@infradead.org> (raw)
In-Reply-To: <alpine.DEB.2.00.1508060559410.22099@cobra.newdream.net>
On Thu, Aug 06, 2015 at 06:00:42AM -0700, Sage Weil wrote:
> I'm guessing the strategy here should be to fsync the file (leaf) and then
> any affected ancestors, such that the directory fsyncs are effectively
> no-ops? Or does it matter?
All metadata transactions log the involve parties (parent and child
inode(s) mostly) in the same transaction. So flushing one of them out
is enough. But file data I/O might dirty the inode before flushing them
out, so to not need to write out the inode log item twice you first want
to fsync any file that had data I/O followed by directories or special
files that only had metadata modified.
prev parent reply other threads:[~2015-08-06 13:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-05 21:26 FileStore should not use syncfs(2) Sage Weil
2015-08-05 21:38 ` Somnath Roy
2015-08-06 2:17 ` Haomai Wang
2015-08-06 12:47 ` Sage Weil
2015-08-05 21:55 ` Mark Nelson
2015-08-07 6:50 ` Chen, Xiaoxi
2015-08-06 9:44 ` Yan, Zheng
2015-08-06 12:57 ` Sage Weil
2015-08-06 11:27 ` Christoph Hellwig
2015-08-06 13:00 ` Sage Weil
2015-08-06 13:06 ` Christoph Hellwig [this message]
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=20150806130636.GA20436@infradead.org \
--to=hch@infradead.org \
--cc=Somnath.Roy@sandisk.com \
--cc=ceph-devel@vger.kernel.org \
--cc=sjust@redhat.com \
--cc=sweil@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.