From: Paolo Bonzini <pbonzini@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
nbd-general@lists.sf.net,
Paul Clements <Paul.Clements@steeleye.com>
Subject: Re: [PATCH 2/3] nbd: fsync and kill block device on shutdown
Date: Wed, 13 Feb 2013 14:05:40 +0100 [thread overview]
Message-ID: <511B8FA4.1080400@redhat.com> (raw)
In-Reply-To: <20130212134155.f23f2223.akpm@linux-foundation.org>
Il 12/02/2013 22:41, Andrew Morton ha scritto:
>> > There are two problems with shutdown in the NBD driver. The first is
>> > that receiving the NBD_DISCONNECT ioctl does not sync the filesystem;
>> > this is useful because BLKFLSBUF is restricted to processes that have
>> > CAP_SYS_ADMIN, and the NBD client may not possess it (fsync of the
>> > block device does not sync the filesystem, either).
> hm, this says that the lack of a sync is "useful". I think you mean
> that the patch-which-adds-the-sync is the thing which is useful, yes?
Yes.
>> > The second is that once we clear the socket we have no guarantee that
>> > later reads will come from the same backing storage. Thus the page cache
>> > must be cleaned, lest reads that hit on the page cache will return stale
>> > data from the previously-accessible disk.
> That sounds like a problem.
>
>> > Example:
>> >
>> > # qemu-nbd -r -c/dev/nbd0 /dev/sr0
>> > # file -s /dev/nbd0
>> > /dev/stdin: # UDF filesystem data (version 1.5) etc.
>> > # qemu-nbd -d /dev/nbd0
>> > # qemu-nbd -r -c/dev/nbd0 /dev/sda
>> > # file -s /dev/nbd0
>> > /dev/stdin: # UDF filesystem data (version 1.5) etc.
>> >
>> > While /dev/sda has:
>> >
>> > # file -s /dev/sda
>> > /dev/sda: x86 boot sector; etc.
> OK, we've described the problems but there's no description here of how
> the patch addresses those problems.
>
> How does this look?
Perfect, thanks very much. I tried to similarly balance the "why" and
"how" in the new commit message for patch 1.
Paolo
next prev parent reply other threads:[~2013-02-13 13:06 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-12 16:06 [PATCH 0/3] NBD fixes for caching and block device flags Paolo Bonzini
2013-02-12 16:06 ` [PATCH 1/3] nbd: support FLUSH requests Paolo Bonzini
2013-02-12 17:37 ` Alex Bligh
2013-02-12 18:06 ` Paolo Bonzini
2013-02-12 21:32 ` Andrew Morton
2013-02-13 0:03 ` Alex Bligh
2013-02-13 13:00 ` Paolo Bonzini
2013-02-13 15:55 ` Alex Bligh
2013-02-13 16:02 ` Paolo Bonzini
2013-02-13 17:35 ` Alex Bligh
2013-02-13 0:00 ` Alex Bligh
2013-02-12 22:07 ` Paul Clements
2013-02-12 16:06 ` [PATCH 2/3] nbd: fsync and kill block device on shutdown Paolo Bonzini
2013-02-12 21:41 ` Andrew Morton
2013-02-13 13:05 ` Paolo Bonzini [this message]
2013-02-12 22:15 ` Paul Clements
2013-02-12 16:06 ` [PATCH 3/3] nbd: show read-only state in sysfs Paolo Bonzini
2013-02-12 22:16 ` Paul Clements
2013-02-12 21:43 ` [PATCH 0/3] NBD fixes for caching and block device flags Andrew Morton
2013-02-13 17:14 ` [Nbd] " Wouter Verhelst
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=511B8FA4.1080400@redhat.com \
--to=pbonzini@redhat.com \
--cc=Paul.Clements@steeleye.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nbd-general@lists.sf.net \
--cc=stable@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 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.