From: Paolo Bonzini <pbonzini@redhat.com>
To: Eric Blake <eblake@redhat.com>, qemu-devel@nongnu.org
Cc: qemu-block@nongnu.org, vsementsov@virtuozzo.com, den@virtuozzo.com
Subject: Re: [Qemu-devel] [PATCH v4 7/8] nbd: Implement NBD_INFO_BLOCK_SIZE on server
Date: Wed, 22 Feb 2017 18:26:57 +0100 [thread overview]
Message-ID: <cfab822e-e63a-7c1e-d740-309c6edd0031@redhat.com> (raw)
In-Reply-To: <5d651e79-bfdf-fb10-472f-89aef48afaf7@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1269 bytes --]
On 22/02/2017 18:11, Eric Blake wrote:
>>> + /* preferred - At least 4096, but larger as appropriate. */
>>> + sizes[1] = MAX(blk_get_opt_transfer(exp->blk), 4096);
>
> The NBD specification requires a non-zero power-of-2 number if the
> server transmits the block size at all; 1 is the ideal number, followed
> by whatever actual size we learn from the request_align of the device.
Oh, so it's the smallest "good" transfer size, or the preferred
alignment. That's not the same as the SCSI definition, which is:
If a device server receives one of these commands with a transfer
size greater than this value, then the device server may incur
delays in processing the command. An OPTIMAL TRANSFER LENGTH field
set to 0000_0000h indicates that the device server does not report
an optimal transfer size.
It's more similar to the physical block size:
When using logical block access commands (see 4.2.2), application
clients should:
a) specify an LBA that is aligned to a physical block boundary; and
b) access an integral number of physical blocks, provided that the
access does not go beyond the last LBA on the medium.
So I'd rather ignore it in the client, and send 4096 in the server.
Paolo
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2017-02-22 17:27 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-21 2:42 [Qemu-devel] [PATCH v4 0/8] Implement NBD_OPT_GO, block size advertisement Eric Blake
2017-02-21 2:42 ` [Qemu-devel] [PATCH v4 1/8] nbd/client: fix drop_sync [CVE-2017-2630] Eric Blake
2017-02-21 8:11 ` Marc-André Lureau
2017-02-21 2:42 ` [Qemu-devel] [PATCH v4 2/8] nbd: Create struct for tracking export info Eric Blake
2017-02-21 8:11 ` Marc-André Lureau
2017-02-21 2:42 ` [Qemu-devel] [PATCH v4 3/8] block: Add blk_get_opt_transfer() Eric Blake
2017-02-21 8:11 ` Marc-André Lureau
2017-02-21 2:42 ` [Qemu-devel] [PATCH v4 4/8] nbd: Expose and debug more NBD constants Eric Blake
2017-02-21 8:12 ` Marc-André Lureau
2017-02-21 2:42 ` [Qemu-devel] [PATCH v4 5/8] nbd: Implement NBD_OPT_GO on server Eric Blake
2017-02-21 2:42 ` [Qemu-devel] [PATCH v4 6/8] nbd: Implement NBD_OPT_GO on client Eric Blake
2017-02-21 2:42 ` [Qemu-devel] [PATCH v4 7/8] nbd: Implement NBD_INFO_BLOCK_SIZE on server Eric Blake
2017-02-22 16:51 ` Paolo Bonzini
2017-02-22 17:11 ` Eric Blake
2017-02-22 17:26 ` Paolo Bonzini [this message]
2017-02-22 20:34 ` Eric Blake
2017-02-23 13:13 ` Paolo Bonzini
2017-02-23 15:38 ` Eric Blake
2017-02-21 2:42 ` [Qemu-devel] [PATCH v4 8/8] nbd: Implement NBD_INFO_BLOCK_SIZE on client 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=cfab822e-e63a-7c1e-d740-309c6edd0031@redhat.com \
--to=pbonzini@redhat.com \
--cc=den@virtuozzo.com \
--cc=eblake@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).