summaryrefslogtreecommitdiffstats
path: root/nbd/trace-events
diff options
context:
space:
mode:
authorEric Blake2017-07-07 22:30:49 +0200
committerPaolo Bonzini2017-07-14 12:04:42 +0200
commit081dd1fe36f0ccc04130d1edd136c787c5f8cc50 (patch)
tree5d0f1fce79c0fb610e6ddc24f6cd29fc197887b3 /nbd/trace-events
parentnbd: Implement NBD_INFO_BLOCK_SIZE on server (diff)
downloadqemu-081dd1fe36f0ccc04130d1edd136c787c5f8cc50.tar.gz
qemu-081dd1fe36f0ccc04130d1edd136c787c5f8cc50.tar.xz
qemu-081dd1fe36f0ccc04130d1edd136c787c5f8cc50.zip
nbd: Implement NBD_INFO_BLOCK_SIZE on client
The upstream NBD Protocol has defined a new extension to allow the server to advertise block sizes to the client, as well as a way for the client to inform the server whether it intends to obey block sizes. When using the block layer as the client, we will obey block sizes; but when used as 'qemu-nbd -c' to hand off to the kernel nbd module as the client, we are still waiting for the kernel to implement a way for us to learn if it will honor block sizes (perhaps by an addition to sysfs, rather than an ioctl), as well as any way to tell the kernel what additional block sizes to obey (NBD_SET_BLKSIZE appears to be accurate for the minimum size, but preferred and maximum sizes would probably be new ioctl()s), so until then, we need to make our request for block sizes conditional. When using ioctl(NBD_SET_BLKSIZE) to hand off to the kernel, use the minimum block size as the sector size if it is larger than 512, which also has the nice effect of cooperating with (non-qemu) servers that don't do read-modify-write when exposing a block device with 4k sectors; it might also allow us to visit a file larger than 2T on a 32-bit kernel. Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <20170707203049.534-10-eblake@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'nbd/trace-events')
-rw-r--r--nbd/trace-events1
1 files changed, 1 insertions, 0 deletions
diff --git a/nbd/trace-events b/nbd/trace-events
index be3dce773e..f5024d85a1 100644
--- a/nbd/trace-events
+++ b/nbd/trace-events
@@ -6,6 +6,7 @@ nbd_reply_err_unsup(uint32_t option, const char *name) "server doesn't understan
nbd_opt_go_start(const char *name) "Attempting NBD_OPT_GO for export '%s'"
nbd_opt_go_success(void) "Export is good to go"
nbd_opt_go_info_unknown(int info, const char *name) "Ignoring unknown info %d (%s)"
+nbd_opt_go_info_block_size(uint32_t minimum, uint32_t preferred, uint32_t maximum) "Block sizes are 0x%" PRIx32 ", 0x%" PRIx32 ", 0x%" PRIx32
nbd_receive_query_exports_start(const char *wantname) "Querying export list for '%s'"
nbd_receive_query_exports_success(const char *wantname) "Found desired export name '%s'"
nbd_receive_starttls_request(void) "Requesting TLS from server"