for liberating data from old images.
> +# @luks: LUKS encryption format. Recommended for new images
> #
> # Since: 2.6
> ##
> { 'enum': 'QCryptoBlockFormat',
> # 'prefix': 'QCRYPTO_BLOCK_FORMAT',
> - 'data': [
ead
> the qcow2 header, for example.
s/todo/to do/2
>
> Signed-off-by: Daniel P. Berrange
> ---
> block.c | 5 +++--
> block/io.c| 2 ++
> include/block/block.h | 1 +
> qemu-img.c| 33 +
> 4 files changed,
On 02/05/2016 05:43 AM, Daniel P. Berrange wrote:
> On Thu, Feb 04, 2016 at 05:23:32PM -0700, Eric Blake wrote:
>> On 01/20/2016 10:38 AM, Daniel P. Berrange wrote:
>>> Add a generic framework for support different block encryption
>>> formats. Upon instantiating a Q
qemu-io.c | 2 +-
> 2 files changed, 3 insertions(+), 2 deletions(-)
>
Reviewed-by: Eric Blake
--
Eric Blake eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
nd Clang -fsanitize=undefined.
>
> Zero the stack object at allocation AND make sure the utility to
> populate the fields properly marks has_filename as false if applicable.
>
> Signed-off-by: John Snow
> ---
> v2: Initialize with a compound literal as a future-proof
f you fix qcrypto_block_get_payload_offset to be in
bytes.
> +++ b/qapi/block-core.json
> @@ -1546,7 +1546,7 @@
> { 'enum': 'BlockdevDriver',
>'data': [ 'archipelago', 'blkdebug', 'blkverify', 'bochs', 'cloop
>
> Signed-off-by: Daniel P. Berrange
> ---
> block/qcow2-cluster.c | 17 +
> block/qcow2.c | 5 ++---
> block/qcow2.h | 3 +--
> 3 files changed, 8 insertions(+), 17 deletions(-)
Reviewed-by: Eric Blake
--
Eric Blake eblake redh
f refcount_bits=16 key-secret=sec0
So now that we support LUKS encryption by default, we no longer need the
deprecation warning. Do we still forbid the creation of new images with
non-LUKS encryption? That is, even though the new code will let us read
old images, I want to make sure we te
ill check
> interoperability between qemu + cryptsetup. Slight complication is
> that those io tests all expect to run unprivileged. So it'll need
> a manual step run privileged to create the cryptsetup disk images
> for testing with.
We've checked in compressed binary
f,
> +if (encrypt_sectors(s, sector_num, buf,
> n, true, &err) < 0) {
> error_free(err);
> ret = -EIO;
> break;
> }
> -src_buf = cluster_data;
cluster_data is
et: #optional ID of the "secret" object providing the
> +#AES decryption key.
Maybe worth a mention that this is supported for decrypting old images,
but not for use in creating new images (but then again, who creates new
qcow images these days).
With the commit typo
/* if true, the device is a /dev/sg* */
> int copy_on_read; /* if true, copy read backing sectors into image
> note this is a reference count */
Hmm - several variables that are only 'true' or 'false' and should be
typed '
;&
> +s->crypt_method_header == QCOW_CRYPT_AES) {
> +error_setg(errp,
> + "Use of AES-CBC encrypted qcow2 images is no longer "
> + "supported. Please use the qcow2 LUKS format
> instead.");
Ditto
--
Eric Blake eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
esn't hurt, either, if you want to
mention it in the commit as intentional.
Reviewed-by: Eric Blake
--
Eric Blake eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
lock-io.h | 15 +++++------
> 2 files changed, 9 insertions(+), 47 deletions(-)
Reviewed-by: Eric Blake
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
On Mon, Apr 04, 2022 at 11:48:46AM +0100, Richard W.M. Jones wrote:
Whoops, looks like I let this one sit for a while.
> On Fri, Apr 01, 2022 at 04:08:07PM -0500, Eric Blake wrote:
> > Our docs were inconsistent on whether a NBD_REPLY_TYPE_BLOCK_STATUS
> > reply chunk can exce
27;ssh', 'throttle', 'vdi', 'vhdx', 'vmdk', 'vpc', 'vvfat' ] }
> +'ssh', 'throttle', 'vdi', 'vhdx', 'vmdk', 'vpc', 'vvfat',
> +{ 'name': 'zoned_host_device', 'if': 'CONFIG_BLKZONED' } ] }
Missing a documentation line of '# @zoned_host_deivce: Since 7.2'.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
is necessary?
> + */
> +typedef struct BlockZoneDescriptor {
> +uint64_t start;
> +uint64_t length;
> +uint64_t cap;
> +uint64_t wp;
> +BlockZoneType type;
> +BlockZoneCondition cond;
> +} BlockZoneDescriptor;
> +
> typedef struct BlockDriverInfo {
>
On Fri, Dec 03, 2021 at 05:14:34PM -0600, Eric Blake wrote:
> Add a new negotiation feature where the client and server agree to use
> larger packet headers on every packet sent during transmission phase.
> This has two purposes: first, it makes it possible to perform
> operations like
hat we are aware that no wraparound is
possible.
Fixes: 93676c88 ("nbd: Don't send oversize strings", v4.2.0)
Reported-by: Dr. David Alan Gilbert
Signed-off-by: Eric Blake
---
nbd/client.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/nbd/client.c b/nbd/c
Given the file touched by this patch[1],
The subject should use 'nbd/client:'
On Mon, Oct 17, 2022 at 12:37:27PM -0500, Eric Blake wrote:
> Assigning strlen() to a uint32_t and then asserting that it isn't too
> large doesn't catch the case of an input string 4G in
t;, v4.2.0)
Reported-by: Dr. David Alan Gilbert
Signed-off-by: Eric Blake
---
v2: update subject line and commit message to reflect file being
touched; adjust a second nearby assertion with the same issue
nbd/client.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/nbd/c
On Mon, Oct 24, 2022 at 02:59:48PM +0300, Vladimir Sementsov-Ogievskiy wrote:
> On 10/17/22 22:12, Eric Blake wrote:
> > Assigning strlen() to a uint32_t and then asserting that it isn't too
> > large doesn't catch the case of an input string 4G in length.
> > Thank
t; blockdev.c | 17 +----
> 1 file changed, 9 insertions(+), 8 deletions(-)
>
Reviewed-by: Eric Blake
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
n when arg is finally freed.
>
> Exactly. However, the copy in nbd_export_create() remained dirty.
>
> Clean it up. Since the value stored in member @name is not actually
> used outside this function, use a local variable instead of modifying
> the QAPI object.
>
> Signe
rt of implementing NBD_REPLY_TYPE_BLOCK_STATUS_EXT to
a separate patch.
Signed-off-by: Eric Blake
---
nbd/nbd-internal.h | 7 ++-
nbd/server.c | 132 +++--
2 files changed, 108 insertions(+), 31 deletions(-)
diff --git a/nbd/nbd-internal.h b/nb
Overcome the inherent 32-bit limitation of our existing
nbd_block_status command by adding a 64-bit variant. The command sent
to the server does not change, but the user's callback is now handed
64-bit information regardless of whether the server replies with 32-
or 64-bit extents.
Unit tests pro
extended headers with the server,
allowing the nbd driver to pass larger requests along where possible;
although in this patch they always remain false for no semantic change
yet.
Signed-off-by: Eric Blake
---
include/block/nbd.h | 21 -
nbd/nbd-internal.h | 3 +--
block
essential to the information collected during
'qemu-nbd --list', but probing for it gives us one more piece of
information in that output. Update the iotests affected by the new
line of output.
Signed-off-by: Eric Blake
---
nbd/client-connection.c | 1 +
nb
There are some potential extension metadata contexts that would
benefit from a 64-bit status value. For example, Zoned Block Devices
(see https://zonedstorage.io/docs/linux/zbd-api) may want to return
the relative offset of where the next write will occur within the
zone, where a zone may be large
The new NBD_OPT_EXTENDED_HEADERS feature is worth using by default,
but there may be cases where the user explicitly wants to stick with
the older 32-bit headers. nbd_set_request_extended_headers() will let
the client override the default, nbd_get_request_extended_headers()
determines the current
does not change the status quo that neither the client nor
server use a packed-struct representation for the request header.
Signed-off-by: Eric Blake
---
[*]tweak commit message once nbd commit id available
---
docs/interop/nbd.txt | 1 +
include/block/nbd.h | 74
This is the culmination of the previous patches' preparation work for
using extended headers when possible. The new states in the state
machine are copied extensively from our handling of
OPT_STRUCTURED_REPLY. The next patch will then expose a new API
nbd_opt_extended_headers() for manual control
length, we should drop the connection
right then rather than assuming the layer on top will be careful.
This becomes more important when we permit 64-bit lengths which are
even more likely to have the potential for attempted denial of service
abuse.
Signed-off-by: Eric Blake
---
nbd/client.c
In the recent NBD protocol extensions to add 64-bit commands, an
additional option was added to allow NBD_CMD_BLOCK_STATUS pass a
client payload instructing the server to filter its answers (mainly
useful when the client requests more than one meta context with
NBD_OPT_SET_META_CONTEXT). This patc
Although our use of "base:allocation" doesn't require the use of the
64-bit API for flags, we might perform slightly faster for a server
that does give us 64-bit extent lengths.
---
dump/dump.c | 27 ++-
1 file changed, 14 insertions(+), 13 deletions(-)
diff --git a/dump/d
Add another bit of overall server information, as well as a '--can
extended-headers' silent query. For now, the testsuite is written
assuming that when nbdkit finally adds extended headers support, it
will also add a --no-eh kill switch comparable to its existing --no-sr
switch.
---
info/nbdinfo.
Very similar to the recent addition of nbd_opt_structured_reply,
giving us fine-grained control over an extended headers request.
Because nbdkit does not yet support extended headers, testsuite
coverage is limited to interop testing with qemu-nbd. It shows that
extended headers imply structured r
Even though we don't currently allow the user to request NBD_CMD_READ
with more than 64M (and even if we did, our API signature caps us at
SIZE_MAX, which is 32 bits on a 32-bit machine), upstream NBD commit
XXX[*] states that for symmetry with 64-bit requests, extended header
clients must be prepa
return on a per-command basis (for
now, identical to the full set of negotiated contexts).
Signed-off-by: Eric Blake
---
include/block/nbd.h | 20 +++-
nbd/server.c| 108 +++-
2 files changed, 75 insertions(+), 53 deletions(-)
diff --git a
Prove that we can round-trip a block status request larger than 4G
through a new-enough qemu-nbd. Also serves as a unit test of our shim
for converting internal 64-bit representation back to the older 32-bit
nbd_block_status callback interface.
---
interop/Makefile.am | 6 ++
interop/large-
The existing nbd_block_status() callback is permanently stuck with an
array of uint32_t pairs (len/2 extents), which is both constrained on
maximum extent size (no larger than 4G) and on the status flags (must
fit in 32 bits). While the "base:allocation" metacontext will never
exceed 32 bits, it i
Since we cap NBD_CMD_READ requests to 32M, we never have a reason to
send a 64-bit chunk type for a hole; but it is worth producing these
for interoperability testing of clients that want extended headers.
---
nbd/server.c | 20
1 file changed, 16 insertions(+), 4 deletions(-)
if we are happy with the direction the spec is
headed in.
Eric Blake (15):
nbd/client: Add safety check on chunk payload length
nbd/server: Prepare for alternate-size headers
nbd: Prepare for 64-bit request effect lengths
nbd: Add types for extended headers
nbd/server: Refactor handli
The spec was silent on how many extents a server could reply with.
However, both qemu and nbdkit (the two server implementations known to
have implemented the NBD_CMD_BLOCK_STATUS extension) implement a hard
cap, and will truncate the amount of extents in a reply to avoid
sending a client a reply s
checking whether more than the two least-significant bits are set.
Signed-off-by: Eric Blake
---
block/nbd.c| 38 +++---
block/trace-events | 1 +
2 files changed, 28 insertions(+), 11 deletions(-)
diff --git a/block/nbd.c b/block/nbd.c
index a8b1bc1054.
express dynamic interest
in varying subsets of those contexts over the life of the connection,
for less wasted effort in responding to NBD_CMD_BLOCK_STATUS. This
works by having the command payload supply an effect length and a list
of ids the client is currently interested in.
Signed-off-by: Eric
Commit 9f30fedb improved the spec to allow non-payload requests that
exceed any advertised maximum block size. Take this one step further
by permitting the server to use NBD_EOVERFLOW as a hint to the client
when a request is oversize (while permitting NBD_EINVAL for
back-compat), and by rewording
Since our example program for 32-bit extents is inherently limited to
32-bit lengths, it is also worth demonstrating the 64-bit extent API,
including the difference in the array indexing being saner.
---
ocaml/examples/Makefile.am | 3 ++-
ocaml/examples/extents64.ml | 42 +++
Support a server giving us a 64-bit extent. Note that the protocol
says a server should not give a 64-bit answer when extended headers
are not negotiated; we can handle that by reporting EPROTO but
otherwise accepting the information. Meanwhile, when extended headers
are in effect, even a 32-bit
Support receiving headers for 64-bit replies if extended headers were
negotiated. We already insist that the server not send us too much
payload in one reply, so we can exploit that and merge the 64-bit
length back into a normalized 32-bit field for the rest of the payload
length calculations. Th
In order to more easily add a third reply type with an even larger
header, but where the payload will look the same for both structured
and extended replies, it is nicer if simple and structured replies are
nested inside the same layer of sbuf.reply.hdr. While at it, note
that while .or and .sr ar
Add the magic numbers and new structs necessary to implement the NBD
protocol extension of extended headers providing 64-bit lengths. This
corresponds to upstream nbd commits XXX-XXX[*].
---
[*] FIXME update commit ids before pushing
---
lib/nbd-protocol.h | 66 ++
When extended headers are in use, the server can send us 64-bit
extents, even for a 32-bit query (if the server knows the entire image
is data, for example, or if the metacontext has a status definition
that uses more than 32 bits). Also, while most contexts only have
32-bit flags, a server is all
two RFC projects include it,
the protocol is incompatible between the two, but at least client and
server gracefully detect the bug rather than SEGV'ing).
Eric Blake (23):
block_status: Refactor array storage
internal: Refactor layout of replies in sbuf
protocol: Add definitions for ext
nit tests added in qemu and libnbd
- the series end with RFC patches on whether to support 64-bit hole
responses to NBD_CMD_READ, even though our current limitations say
servers don't have to accept more than a 32M read request and
therefore will never have that big of a hole to r
Support sending 64-bit requests if extended headers were negotiated.
This includes setting NBD_CMD_FLAG_PAYLOAD_LEN any time we send an
extended NBD_CMD_WRITE; this is such a fundamental part of the
protocol that for now it is easier to silently ignore whatever value
the user passes in for that bit
BD transmission packets started on an
8-byte boundary after option haggling has completed.
This spec addition was done in parallel with proof of concept
implementations in qemu (server and client), libnbd (client), and
nbdkit (server).
Signed-off-by: Eric Blake
---
doc
server
is advertising the capability, and to the testsuite to reflect the
addition to that output.
Signed-off-by: Eric Blake
---
docs/interop/nbd.txt | 2 +-
include/block/nbd.h | 32 --
nbd/server.c
the buffer is also available). This
is a refactoring patch to pass the full request around the reply
stack, rather than just the handle, so that later patches can then
access request->from when extended headers are active. But for this
patch, there are no semantic changes.
Signed-off-b
qsort()'s manual page).
>
> Signed-off-by: Max Reitz
> ---
> block.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
I'm a bit surprised that code sanitizers like Coverity or ASAN aren't
(yet?) able to flag this.
Reviewed-by: Eric Blake
>
> diff --git a
ns(+)
>
Reviewed-by: Eric Blake
--
Eric Blake eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
s/162
> +++ b/tests/qemu-iotests/162
> @@ -35,6 +35,9 @@ status=1# failure is the default!
> _supported_fmt generic
> _supported_os Linux
>
> +test_ssh=$($QEMU_IMG --help | grep '^Supported formats:.* ssh\( \|$\)')
> +[ "$test_ssh" = "" ] &
ng request callbacks, while leaving the
shorter name for the description of the request sent over the
wire in the NBD protocol.
Signed-off-by: Eric Blake
---
v6: new patch
---
nbd/server.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/nbd/server.c
g the description.
Signed-off-by: Eric Blake
---
v6: rebase to latest
v5: rebase to latest
v4: rebase to latest
---
include/block/nbd.h | 1 +
nbd/nbd-internal.h | 5 +++--
nbd/server.c| 34 ++
qemu-nbd.c | 12 +++-
qemu-nbd.texi
The NBD Protocol allows us to send human-readable messages
along with any NBD_REP_ERR error during option negotiation;
make use of this fact for clients that know what to do with
our message.
Signed-off-by: Eric Blake
---
v6: tweak comments, fix indentation
v5: don't leak 'msg'
some nearby code to keep checkpatch.pl happy.
Signed-off-by: Eric Blake
---
v6: no change
v5: no change
v4: rebase to earlier changes
v3: rebase to other changes earlier in series
---
include/block/nbd.h | 18 --
nbd/nbd-internal.h | 4 ++--
block/nbd-client.c | 9
It's better to use consistent capitalization of the namespace
used for NBD functions; we have more instances of NBD* than
Nbd*.
Signed-off-by: Eric Blake
---
v6: new patch
---
block/nbd-client.h | 6 +++---
block/nbd-client.c | 26 +-
block/nbd.c| 4 ++
Our coding convention prefers CamelCase names, and we already
have other existing structs with NBDFoo naming. Let's be
consistent, before later patches add even more structs.
Signed-off-by: Eric Blake
---
v6: new patch
---
block/nbd-client.h | 2 +-
include/block/nbd.h | 10 ++
Rather than open-coding each option request, it's easier to
have common helper functions do the work. That in turn requires
having convenient packed types for handling option requests
and replies.
Signed-off-by: Eric Blake
---
v6: comment and formatting tweaks
v5: no change
v4: reba
with what we've sent,
whether or not we've read everything the server has sent.
Technically, the server then has to reply with NBD_REP_ACK, but
it's not worth complicating the client to wait around for that
reply.
Signed-off-by: Eric Blake
---
v6: rebase
v5: no change
v4: new patch
--
ss allocation during NBD_OPT_LIST'
012/15:[] [-C] 'nbd: Support shorter handshake'
013/15:[] [-C] 'nbd: Improve server handling of shutdown requests'
014/15:[----] [-C] 'nbd: Implement NBD_CMD_WRITE_ZEROES on server'
015/15:[0006] [FC] 'nbd: Implement N
Rather than open-coding NBD_REP_SERVER, reuse the code we
already have by adding a length parameter. Additionally,
the refactoring will make adding NBD_OPT_GO in a later patch
easier.
Signed-off-by: Eric Blake
---
v6: improve (and add) function comments
v5: no change
v4: no change
v3: rebase
, the 'may use holes' scenario is optional (the
server need not use a hole, and must not use a hole if
subsequent reads would not see zeroes).
Signed-off-by: Eric Blake
---
v6: rebase, improve commit message
v5: no change
v4: rebase, fix value for constant
v3: abandon NBD_CMD_CLOSE
idea into the client where
we have places where we want to ignore data (such as the
description tacked on the end of NBD_REP_SERVER).
Signed-off-by: Eric Blake
---
v6: rebase
v5: no change
v4: rebase
v3: rebase
---
nbd/client.c | 47 +--
1 file change
-off-by: Eric Blake
---
v6: rebase
v5: enhance commit message
v4: rebase to byte-based limits
v3: rebase, tell block layer about our support
---
block/nbd-client.h | 2 ++
block/nbd-client.c | 35 +++
block/nbd.c| 4
3 files changed, 41 insertions
waits for the client to react,
rather than just out-right quitting - but that's a bigger task for
another day).
Signed-off-by: Eric Blake
---
v6: rebase
v5: no change
v4: new patch
---
include/block/nbd.h | 13 +
nbd/nbd-internal.h | 1 +
nbd/client.c| 16
27;t match what
we are searching for.
Signed-off-by: Eric Blake
---
v6: rebase
v5: alter signature of nbd_receive_list for simpler logic
v4: rebase
v3: tweak commit message
---
nbd/client.c | 145 +--
1 file changed, 70 insertions(+
doesn't
shave much off the wire, but we might as well implement it.
Signed-off-by: Eric Blake
Reviewed-by: Alex Bligh
---
v6: rebase
v5: no change
v4: rebase
v3: rebase
---
include/block/nbd.h | 6 --
nbd/client.c| 8 +++-
nbd/server.c| 15 +++
3 files ch
ssing errno value on mingw. I'll come
up with something to squash in to 13/15.
--
Eric Blake eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
:
ret = ESHUTDOWN;
return ret;
(and so on for all the cases in the switch), to hide the fact that we
intentionally want to return a positive errno value, if it bothers
anyone enough to ask me to do so.
--
Eric Blake eblake redhat com+1-919-301-3266
Libvirt virtualization library http:
It's better to use consistent capitalization of the namespace
used for NBD functions; we have more instances of NBD* than
Nbd*.
Signed-off-by: Eric Blake
---
v6: new patch
---
block/nbd-client.h | 6 +++---
block/nbd-client.c | 26 +-
block/nbd.c| 4 ++
Refactor conversion to errno to silence checkpatch'
014/16:[0012] [FC] 'nbd: Improve server handling of shutdown requests'
015/16:[] [--] 'nbd: Implement NBD_CMD_WRITE_ZEROES on server'
016/16:[] [--] 'nbd: Implement NBD_CMD_WRITE_ZEROES on client'
Eric Blak
some nearby code to keep checkpatch.pl happy.
Signed-off-by: Eric Blake
---
v6: no change
v5: no change
v4: rebase to earlier changes
v3: rebase to other changes earlier in series
---
include/block/nbd.h | 18 --
nbd/nbd-internal.h | 4 ++--
block/nbd-client.c | 9
ng request callbacks, while leaving the
shorter name for the description of the request sent over the
wire in the NBD protocol.
Signed-off-by: Eric Blake
---
v6: new patch
---
nbd/server.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/nbd/server.c
g the description.
Signed-off-by: Eric Blake
---
v6: rebase to latest
v5: rebase to latest
v4: rebase to latest
---
include/block/nbd.h | 1 +
nbd/nbd-internal.h | 5 +++--
nbd/server.c| 34 ++
qemu-nbd.c | 12 +++-
qemu-nbd.texi
Rather than open-coding each option request, it's easier to
have common helper functions do the work. That in turn requires
having convenient packed types for handling option requests
and replies.
Signed-off-by: Eric Blake
---
v6: comment and formatting tweaks
v5: no change
v4: reba
Rather than open-coding NBD_REP_SERVER, reuse the code we
already have by adding a length parameter. Additionally,
the refactoring will make adding NBD_OPT_GO in a later patch
easier.
Signed-off-by: Eric Blake
---
v6: improve (and add) function comments
v5: no change
v4: no change
v3: rebase
Our coding convention prefers CamelCase names, and we already
have other existing structs with NBDFoo naming. Let's be
consistent, before later patches add even more structs.
Signed-off-by: Eric Blake
---
v6: new patch
---
block/nbd-client.h | 2 +-
include/block/nbd.h | 10 ++
with what we've sent,
whether or not we've read everything the server has sent.
Technically, the server then has to reply with NBD_REP_ACK, but
it's not worth complicating the client to wait around for that
reply.
Signed-off-by: Eric Blake
---
v6: rebase
v5: no change
v4: new patch
--
idea into the client where
we have places where we want to ignore data (such as the
description tacked on the end of NBD_REP_SERVER).
Signed-off-by: Eric Blake
---
v6: rebase
v5: no change
v4: rebase
v3: rebase
---
nbd/client.c | 47 +--
1 file change
The NBD Protocol allows us to send human-readable messages
along with any NBD_REP_ERR error during option negotiation;
make use of this fact for clients that know what to do with
our message.
Signed-off-by: Eric Blake
---
v6: tweak comments, fix indentation
v5: don't leak 'msg'
-off-by: Eric Blake
---
v6: rebase
v5: enhance commit message
v4: rebase to byte-based limits
v3: rebase, tell block layer about our support
---
block/nbd-client.h | 2 ++
block/nbd-client.c | 35 +++
block/nbd.c| 4
3 files changed, 41 insertions
waits for the client to react,
rather than just out-right quitting - but that's a bigger task for
another day).
Signed-off-by: Eric Blake
---
v7: conditionalize ESHUTDOWN for mingw
v6: rebase
v5: no change
v4: new patch
---
include/block/nbd.h | 13 +
nbd/nbd-internal.h | 1 +
Checkpatch complains that 'return EINVAL' is usually wrong
(since we tend to favor 'return -EINVAL'). But it is a
false positive for nbd_errno_to_system_errno(). Since NBD
may add future defined wire values, refactor the code to
keep checkpatch happy.
Signed-off-by: Eri
doesn't
shave much off the wire, but we might as well implement it.
Signed-off-by: Eric Blake
Reviewed-by: Alex Bligh
---
v6: rebase
v5: no change
v4: rebase
v3: rebase
---
include/block/nbd.h | 6 --
nbd/client.c| 8 +++-
nbd/server.c| 15 +++
3 files ch
27;t match what
we are searching for.
Signed-off-by: Eric Blake
---
v6: rebase
v5: alter signature of nbd_receive_list for simpler logic
v4: rebase
v3: tweak commit message
---
nbd/client.c | 145 +--
1 file changed, 70 insertions(+
, the 'may use holes' scenario is optional (the
server need not use a hole, and must not use a hole if
subsequent reads would not see zeroes).
Signed-off-by: Eric Blake
---
v6: rebase, improve commit message
v5: no change
v4: rebase, fix value for constant
v3: abandon NBD_CMD_CLOSE
u want to
treat both '0' and 'name' as an error, but that is not the only error
you want to flag, thus atoi() is insufficient to flag all the errors you
want.
--
Eric Blake eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
P, where we no longer have to escape
commas (even nicer than the drive hack where we support
filename=json:{...} but have to double up all commas to make it through
the QemuOpts layer). Encountering json= as anything other than the
first option would be an error, and you would be unable to combine a
json= option with any other old-style option. In other words, the use
of leading json= would be the switch for whether to do old-style parsing
or to use a saner syntax for everything else that needs structure, on a
per-argument basis.
--
Eric Blake eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
301 - 400 of 9663 matches
Mail list logo