From: Mikulas Patocka <mpatocka@redhat.com>
To: Jeff Moyer <jmoyer@redhat.com>
Cc: Jens Axboe <axboe@kernel.dk>,
"Alasdair G. Kergon" <agk@redhat.com>, Tejun Heo <tj@kernel.org>,
Mike Snitzer <msnitzer@redhat.com>,
Christoph Hellwig <chellwig@redhat.com>,
dm-devel@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Track block device users that created dirty pages
Date: Wed, 3 Apr 2013 17:05:38 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.64.1304031656420.31007@file.rdu.redhat.com> (raw)
In-Reply-To: <x491uau1csj.fsf@segfault.boston.devel.redhat.com>
On Mon, 1 Apr 2013, Jeff Moyer wrote:
> Mikulas Patocka <mpatocka@redhat.com> writes:
>
> > The new semantics is: if a process did some buffered writes to the block
> > device (with write or mmap), the cache is flushed when the process
> > closes the block device. Processes that didn't do any buffered writes to
> > the device don't cause cache flush. It has these advantages:
> > * processes that don't do buffered writes (such as "lvm") don't flush
> > other process's data.
> > * if the user runs "dd" on a block device, it is actually guaranteed
> > that the data is flushed when "dd" exits.
>
> Why don't applications that want data to go to disk just call fsync
> instead of relying on being the last process to have had the device
> open?
>
> Cheers,
> Jeff
Because the user may forget to specify "conv=fsync" on dd command line.
Anyway, when using dd to copy partitions, it should either always flush
buffers on exit or never do it. The current state, when dd mostly flushes
buffers, but doesn't with very low probability (if it races with lvm or
udev) is confusing.
If the admin sees that dd flushes buffers on block devices for all his
trials, he assumes that dd always flushes buffers on block devices. He
doesn't know that there is a tiny race condition that makes dd not flush
buffers.
Mikulas
prev parent reply other threads:[~2013-04-03 21:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-29 16:08 Mikulas Patocka
2013-04-01 15:38 ` Jeff Moyer
2013-04-03 21:05 ` Mikulas Patocka [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=Pine.LNX.4.64.1304031656420.31007@file.rdu.redhat.com \
--to=mpatocka@redhat.com \
--cc=agk@redhat.com \
--cc=axboe@kernel.dk \
--cc=chellwig@redhat.com \
--cc=dm-devel@redhat.com \
--cc=jmoyer@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=msnitzer@redhat.com \
--cc=tj@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
all inboxes | Powered by JetHome®