From: Eric Blake <eblake@redhat.com>
To: Alex Bligh <alex@alex.org.uk>
Cc: "nbd-general@lists.sourceforge.net"
<nbd-general@lists.sourceforge.net>, Wouter Verhelst <w@uter.be>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [Nbd] Is NBD_CMD_FLAG_FUA valid during NBD_CMD_FLUSH?
Date: Fri, 1 Apr 2016 09:31:53 -0600 [thread overview]
Message-ID: <56FE9469.8000900@redhat.com> (raw)
In-Reply-To: <97BC88F7-95E9-4ACB-BCA2-43A43ED5519E@alex.org.uk>
[-- Attachment #1: Type: text/plain, Size: 1990 bytes --]
On 04/01/2016 09:13 AM, Alex Bligh wrote:
>
> On 1 Apr 2016, at 16:12, Alex Bligh <alex@alex.org.uk> wrote:
>
>> as qemu doesn't use FUA on write and the kernel doesn't use FUA
>
> "as qemu doesn't use FUA other than on write" - sorry
qemu's block/nbd-client.c currently sends NBD_CMD_FLAG_FUA on
NBD_CMD_FLUSH (unconditionally, if NBD_FLAG_SEND_FUA was advertised),
and on NBD_CMD_WRITE (conditionally: if NBD_FLAG_SEND_FUA was advertised
AND the upper layer requested FUA). I don't see it being sent on reads,
so on that front, you appear to be correct that no common clients are
expecting any particular behavior on reads.
qemu's nbd/server.c silently ignores NBD_CMD_FLAG_FUA on all commands
except NBD_CMD_READ (conditionally calls blk_co_flush()), NBD_CMD_WRITE
(conditionally calls blk_co_flush()). Ignoring the flag on
NBD_CMD_FLUSH seems to make sense, since that code unconditionally calls
blk_co_flush(), which is all the more the flag was enabling on
read/write. And if you are correct that no real clients are sending FUA
on READ, then deleting (or changing) the server support for FUA on read
should have no negative impact.
qemu doesn't yet implement WRITE_ZEROES.
When qemu client is talking to a qemu server, there is no
incompatibility between the two - all client commands that set FUA are
sanely handled by the recipient server code. But the same is not true
if you pair a current qemu client with current nbd.git server, as the
qemu will unconditionally set FUA on flush, and the server now rejects
it as an invalid flag (thus making it impossible for qemu to flush). So
we probably ought to fix qemu client to quit unconditionally sending FUA
(no change when qemu client talks to qemu server); and at the same time
out to fix NBD server to silently ignore FUA on flush (fix the breakage
between the pairing).
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2016-04-01 15:32 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-31 19:33 [Qemu-devel] Is NBD_CMD_FLAG_FUA valid during NBD_CMD_FLUSH? Eric Blake
2016-03-31 19:41 ` [Qemu-devel] [Nbd] " Alex Bligh
2016-03-31 19:54 ` Eric Blake
2016-03-31 20:17 ` Alex Bligh
2016-03-31 20:34 ` Eric Blake
2016-04-01 7:49 ` Paolo Bonzini
2016-04-01 9:25 ` Alex Bligh
2016-04-01 8:27 ` Wouter Verhelst
2016-04-01 9:40 ` Alex Bligh
2016-04-01 14:16 ` Eric Blake
2016-04-01 15:00 ` Alex Bligh
2016-04-01 15:08 ` Eric Blake
2016-04-01 15:12 ` Alex Bligh
2016-04-01 15:13 ` Alex Bligh
2016-04-01 15:31 ` Eric Blake [this message]
2016-04-01 15:46 ` Alex Bligh
2016-05-02 17:08 ` Eric Blake
2016-04-01 7:43 ` Paolo Bonzini
2016-04-01 9:19 ` Alex Bligh
2016-04-05 5:09 ` Kevin Wolf
2016-04-05 13:28 ` Paolo Bonzini
2016-04-06 13:14 ` Kevin Wolf
2016-04-06 13:28 ` Paolo Bonzini
2016-04-06 13:50 ` Kevin Wolf
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=56FE9469.8000900@redhat.com \
--to=eblake@redhat.com \
--cc=alex@alex.org.uk \
--cc=nbd-general@lists.sourceforge.net \
--cc=qemu-devel@nongnu.org \
--cc=w@uter.be \
/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).