From: Eric Blake <eblake@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
qemu-block@nongnu.org, qemu-devel@nongnu.org
Cc: kwolf@redhat.com, pbonzini@redhat.com, den@openvz.org, mreitz@redhat.com
Subject: Re: [Qemu-devel] [PATCH v4 RFC 9/8] nbd: Minimal structured read for client
Date: Thu, 19 Oct 2017 15:46:51 -0500 [thread overview]
Message-ID: <41d371a1-5665-c88e-03e2-b581301cd570@redhat.com> (raw)
In-Reply-To: <7480d774-569e-9b43-8f0c-7b3b4d9bfbf0@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1937 bytes --]
On 10/17/2017 04:17 PM, Eric Blake wrote:
> On 10/17/2017 07:57 AM, Vladimir Sementsov-Ogievskiy wrote:
>> Minimal implementation: for structured error only error_report error
>> message.
>>
>> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
>> ---
> But in the client, I then perform 'w 0 0' (a zero-byte write, which
> should fail because the server is read-only). I see:
>
> C: 19481@1508268433.381446:nbd_send_request Sending request to server: {
> .from = 0, .len = 0, .handle = 93997172956880, .flags = 0x1, .type = 1
> (write) }
> S: 19479@1508268433.381516:nbd_receive_request Got request: { magic =
> 0x25609513, .flags = 0x1, .type = 0x1, from = 0, len = 0 }
> S: 19479@1508268433.381527:nbd_co_receive_request_decode_type Decoding
> type: handle = 93997172956880, type = 1 (write)
> S: 19479@1508268433.381540:nbd_co_receive_request_payload_received
> Payload received: handle = 93997172956880, len = 0
> S: 19479@1508268433.381564:nbd_co_send_structured_error Send structured
> error reply: handle = 93997172956880, error = 1 (EPERM), msg = ''
> C: 19481@1508268433.381622:nbd_receive_structured_reply_chunk Got
> structured reply chunk: { flags = 0x1, type = 32769, handle =
> 93997172956880, length = 6 }
> C: wrote 0/0 bytes at offset 0
> C: 0 bytes, 1 ops; 0.0002 sec (0 bytes/sec and 4291.8455 ops/sec)
>
> Oops - the client claimed success, even though the server replied with
> EPERM. And the server didn't do a good job of including details on the
> error message. So there's still some tweaks needed.
The server not sending details is a separate pre-existing issue; in
server.c, we set errp for NBD_CMD_WRITE_ZEROES but not for
NBD_CMD_WRITE. You can get the server to cough up a message by using 'w
-z 0 1' instead.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]
next prev parent reply other threads:[~2017-10-19 20:47 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-15 1:01 [Qemu-devel] [PATCH v4 0/8] nbd mimimal structured read Eric Blake
2017-10-15 1:01 ` [Qemu-devel] [PATCH v4 1/8] nbd: Include error names in trace messages Eric Blake
2017-10-16 8:30 ` Vladimir Sementsov-Ogievskiy
2017-10-16 18:05 ` Eric Blake
2017-10-15 1:01 ` [Qemu-devel] [PATCH v4 2/8] nbd: Move nbd_errno_to_system_errno() to public header Eric Blake
2017-10-16 8:33 ` Vladimir Sementsov-Ogievskiy
2017-10-16 12:12 ` Eric Blake
2017-10-15 1:01 ` [Qemu-devel] [PATCH v4 3/8] nbd: Expose constants and structs for structured read Eric Blake
2017-10-16 8:49 ` Vladimir Sementsov-Ogievskiy
2017-10-16 12:15 ` Eric Blake
2017-10-15 1:01 ` [Qemu-devel] [PATCH v4 4/8] nbd: Minimal structured read for server Eric Blake
2017-10-16 9:49 ` Vladimir Sementsov-Ogievskiy
2017-10-16 12:18 ` Eric Blake
2017-10-16 15:41 ` Eric Blake
2017-10-16 19:29 ` Eric Blake
2017-10-15 1:01 ` [Qemu-devel] [PATCH v4 5/8] nbd/server: Include human-readable message in structured errors Eric Blake
2017-10-16 10:59 ` Vladimir Sementsov-Ogievskiy
2017-10-16 12:26 ` Eric Blake
2017-10-19 21:39 ` Eric Blake
2017-10-15 1:01 ` [Qemu-devel] [PATCH v4 6/8] nbd/client: refactor nbd_receive_starttls Eric Blake
2017-10-16 11:09 ` Vladimir Sementsov-Ogievskiy
2017-10-19 19:31 ` Eric Blake
2017-10-15 1:01 ` [Qemu-devel] [PATCH v4 7/8] nbd/client: prepare nbd_receive_reply for structured reply Eric Blake
2017-10-16 11:28 ` Vladimir Sementsov-Ogievskiy
2017-10-15 1:01 ` [Qemu-devel] [PATCH v4 8/8] nbd: Move nbd_read() to common header Eric Blake
2017-10-16 11:31 ` Vladimir Sementsov-Ogievskiy
2017-10-17 12:57 ` [Qemu-devel] [PATCH v4 RFC 9/8] nbd: Minimal structured read for client Vladimir Sementsov-Ogievskiy
2017-10-17 21:17 ` Eric Blake
2017-10-19 20:46 ` Eric Blake [this message]
2017-10-19 19:06 ` Eric Blake
2017-10-19 19:47 ` Eric Blake
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=41d371a1-5665-c88e-03e2-b581301cd570@redhat.com \
--to=eblake@redhat.com \
--cc=den@openvz.org \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=vsementsov@virtuozzo.com \
/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).