From: Jan Kara <jack@suse.cz>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
chris.mason@oracle.com, jack@suse.cz, tytso@mit.edu,
adilger@sun.com, swhiteho@redhat.com,
konishi.ryusuke@lab.ntt.co.jp, mfasheh@suse.com,
joel.becker@oracle.com
Subject: Re: [PATCH] notes on volatile write caches vs fdatasync
Date: Thu, 27 Aug 2009 15:02:52 +0200 [thread overview]
Message-ID: <20090827130252.GC14240@duck.novell.com> (raw)
In-Reply-To: <20090827011624.GA10405@lst.de>
Hi,
On Thu 27-08-09 03:16:24, Christoph Hellwig wrote:
> There are two related issues when dealing with volatile write caches,
> the popular and beaten to death one are write barriers to guarantee
> write ordering and stable storage for log writes. For this post
> I assume naively this works perfectly for all filesystems supporting it.
>
> The second issue are plain cache flush. Yes, they happen to be the
> base for the barrier implementation on all common disks in Linux, but
> there are cases where we need to issue them even without a log barrier.
>
> Think about a plain write into a file that is already fully allocated.
> Or the O_DIRECT version of them same. If we do an fdatasync after these
> we really do expect the write to really be on disk, not just in the disk
> cache, right? The same is true for O_SYNC, but I ignore it for this
> write out as with Jan's patch series O_SYNC writes will be implemented
> by a range-fdatasync after the actual write, so after that this sync
> section covers it, too.
I've noticed this as well when we were tracking some problems Pavel
Machek found with his USB stick. I even wrote a patch at the time
http://osdir.com/ml/linux-ext4/2009-01/msg00015.html
but it somehow died out. Now, the situation should be simpler with
fsync paths cleaned up... BTW: People wanted this to be configurable per
block device which probably makes sence...
Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
next prev parent reply other threads:[~2009-08-27 13:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-27 1:16 [PATCH] notes on volatile write caches vs fdatasync Christoph Hellwig
2009-08-27 1:19 ` Christoph Hellwig
2009-08-27 13:02 ` Jan Kara [this message]
2009-08-27 18:49 ` Christoph Hellwig
2009-08-27 19:26 ` Jeff Garzik
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=20090827130252.GC14240@duck.novell.com \
--to=jack@suse.cz \
--cc=adilger@sun.com \
--cc=chris.mason@oracle.com \
--cc=hch@lst.de \
--cc=joel.becker@oracle.com \
--cc=konishi.ryusuke@lab.ntt.co.jp \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mfasheh@suse.com \
--cc=swhiteho@redhat.com \
--cc=tytso@mit.edu \
/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;
as well as URLs for NNTP newsgroup(s).