From: Kevin Wolf <kwolf@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: nbd-general@lists.sourceforge.net, qemu-devel@nongnu.org,
Pavel Borzenkov <pborzenkov@virtuozzo.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>, Wouter Verhelst <w@uter.be>,
"Denis V. Lunev" <den@openvz.org>
Subject: Re: [Qemu-devel] [PATCH v2] doc: Add NBD_CMD_BLOCK_STATUS extension
Date: Tue, 5 Apr 2016 06:05:27 +0200 [thread overview]
Message-ID: <20160405040527.GA4183@noname.redhat.com> (raw)
In-Reply-To: <1459787950-15286-1-git-send-email-eblake@redhat.com>
Am 04.04.2016 um 18:39 hat Eric Blake geschrieben:
> With the availability of sparse storage formats, it is often needed
> to query status of a particular range and read only those blocks of
> data that are actually present on the block device.
>
> To provide such information, the patch adds the BLOCK_STATUS
> extension with one new NBD_CMD_BLOCK_STATUS command, a new
> structured reply chunk format, and a new transmission flag.
>
> There exists a concept of data dirtiness, which is required
> during, for example, incremental block device backup. To express
> this concept via NBD protocol, this patch also adds a flag to
> NBD_CMD_BLOCK_STATUS to request dirtiness information rather than
> provisioning information; however, with the current proposal, data
> dirtiness is only useful with additional coordination outside of
> the NBD protocol (such as a way to start and stop the server from
> tracking dirty sectors). Future NBD extensions may add commands
> to control dirtiness through NBD.
>
> Since NBD protocol has no notion of block size, and to mimic SCSI
> "GET LBA STATUS" command more closely, it has been chosen to return
> a list of extents in the response of NBD_CMD_BLOCK_STATUS command,
> instead of a bitmap.
>
> CC: Pavel Borzenkov <pborzenkov@virtuozzo.com>
> CC: Denis V. Lunev <den@openvz.org>
> CC: Wouter Verhelst <w@uter.be>
> CC: Paolo Bonzini <pbonzini@redhat.com>
> CC: Kevin Wolf <kwolf@redhat.com>
> CC: Stefan Hajnoczi <stefanha@redhat.com>
> Signed-off-by: Eric Blake <eblake@redhat.com>
I think there is one common type of request that clients can't implement
efficiently with this proposal: Give me the status and the length of the
next extent of blocks with the same status. This is essentially how
bdrv_get_block_status() works in qemu, so we want an efficient way to do
this.
With this proposal, if I understand correctly, we could either send
short NBD_CMD_BLOCK_STATUS requests and risk being inefficient because
we need many calls for a large area with the same status; or, if we send
a large NBD_CMD_BLOCK_STATUS request, we may get a ridiculously long
reply (with the corresponding overhead on the server to compose the
list) while we're only really interested in the first descriptor.
The options I can think of is adding a request field "max number of
descriptors" or a flag "only single descriptor" (with the assumption
that clients always want one or unlimited), but maybe you have a better
idea.
Kevin
next prev parent reply other threads:[~2016-04-05 4:05 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-04 16:39 [Qemu-devel] [PATCH v2] doc: Add NBD_CMD_BLOCK_STATUS extension Eric Blake
2016-04-04 18:06 ` [Qemu-devel] [Nbd] " Alex Bligh
2016-04-04 19:34 ` Eric Blake
2016-04-04 19:54 ` Denis V. Lunev
2016-04-04 20:03 ` Alex Bligh
2016-04-04 20:08 ` Denis V. Lunev
2016-04-04 20:34 ` Eric Blake
2016-04-04 21:06 ` Denis V. Lunev
2016-04-04 21:12 ` Alex Bligh
2016-04-05 14:15 ` Paolo Bonzini
2016-04-05 15:01 ` Alex Bligh
2016-04-05 15:23 ` Paolo Bonzini
2016-04-05 15:27 ` Alex Bligh
2016-04-05 15:31 ` Paolo Bonzini
2016-04-04 23:08 ` Wouter Verhelst
2016-04-04 23:32 ` Eric Blake
2016-04-05 7:16 ` Wouter Verhelst
2016-04-05 21:44 ` Wouter Verhelst
2016-04-05 7:13 ` Alex Bligh
2016-04-04 19:58 ` Alex Bligh
2016-04-04 20:04 ` Denis V. Lunev
2016-04-04 20:08 ` Alex Bligh
2016-04-04 20:13 ` Denis V. Lunev
2016-04-04 20:15 ` Alex Bligh
2016-04-04 20:27 ` Denis V. Lunev
2016-04-04 20:45 ` Eric Blake
2016-04-04 21:04 ` Denis V. Lunev
2016-04-04 21:12 ` Alex Bligh
2016-04-04 21:17 ` Eric Blake
2016-04-04 21:27 ` Denis V. Lunev
2016-04-04 20:26 ` Eric Blake
2016-04-04 21:07 ` Alex Bligh
2016-04-04 21:25 ` Eric Blake
2016-04-04 22:06 ` Alex Bligh
2016-04-04 20:22 ` Eric Blake
2016-04-05 13:38 ` Paolo Bonzini
2016-04-04 22:40 ` Wouter Verhelst
2016-04-04 23:03 ` Eric Blake
2016-04-05 13:41 ` Paolo Bonzini
2016-04-06 5:57 ` Denis V. Lunev
2016-04-06 14:08 ` Eric Blake
2016-04-05 4:05 ` Kevin Wolf [this message]
2016-04-05 13:43 ` [Qemu-devel] " Paolo Bonzini
2016-04-07 10:38 ` Vladimir Sementsov-Ogievskiy
2016-04-07 16:10 ` Eric Blake
2016-04-07 16:21 ` [Qemu-devel] [Nbd] " Alex Bligh
2016-04-08 11:35 ` [Qemu-devel] " Kevin Wolf
2016-04-09 9:08 ` [Qemu-devel] [Nbd] " Wouter Verhelst
2016-04-13 12:38 ` [Qemu-devel] " Pavel Borzenkov
2016-04-13 14:40 ` Eric Blake
2016-04-07 15:35 ` Pavel Borzenkov
2016-04-07 15:43 ` Paolo Bonzini
2016-04-05 8:51 ` Stefan Hajnoczi
2016-04-05 9:24 ` [Qemu-devel] [Nbd] " Markus Pargmann
2016-04-05 13:50 ` Paolo Bonzini
2016-04-11 5:58 ` Markus Pargmann
2016-04-05 14:14 ` Eric Blake
2016-04-05 20:50 ` Wouter Verhelst
2016-04-11 6:07 ` Markus Pargmann
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=20160405040527.GA4183@noname.redhat.com \
--to=kwolf@redhat.com \
--cc=den@openvz.org \
--cc=eblake@redhat.com \
--cc=nbd-general@lists.sourceforge.net \
--cc=pbonzini@redhat.com \
--cc=pborzenkov@virtuozzo.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--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).