qemu/block
Eric Blake 75d34eb98c nbd/client: Trace server noncompliance on structured reads
Just as we recently added a trace for a server sending block status
that doesn't match the server's advertised minimum block alignment,
let's do the same for read chunks.  But since qemu 3.1 is such a
server (because it advertised 512-byte alignment, but when serving a
file that ends in data but is not sector-aligned, NBD_CMD_READ would
detect a mid-sector change between data and hole at EOF and the
resulting read chunks are unaligned), we don't want to change our
behavior of otherwise tolerating unaligned reads.

Note that even though we fixed the server for 4.0 to advertise an
actual block alignment (which gets rid of the unaligned reads at EOF
for posix files), we can still trigger it via other means:

$ qemu-nbd --image-opts driver=blkdebug,align=512,image.driver=file,image.filename=/path/to/non-aligned-file

Arguably, that is a bug in the blkdebug block status function, for
leaking a block status that is not aligned. It may also be possible to
observe issues with a backing layer with smaller alignment than the
active layer, although so far I have been unable to write a reliable
iotest for that scenario.

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20190330165349.32256-1-eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
2019-04-01 08:58:04 -05:00
..
accounting.c
backup.c block/backup: use qemu_iovec_init_buf 2019-02-22 09:42:13 +00:00
blkdebug.c block: Advertise BDRV_REQ_NO_FALLBACK in filter drivers 2019-03-26 11:37:51 +01:00
blklogwrites.c block: Purify .bdrv_refresh_filename() 2019-02-25 15:11:27 +01:00
blkreplay.c
blkverify.c block: Purify .bdrv_refresh_filename() 2019-02-25 15:11:27 +01:00
block-backend.c block: Add bdrv_get_request_alignment() 2019-04-01 08:46:52 -05:00
bochs.c avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
cloop.c block: Require auto-read-only for existing fallbacks 2018-11-05 15:09:55 +01:00
commit.c block: Freeze the backing chain for the duration of the commit job 2019-03-12 20:30:14 +01:00
copy-on-read.c block: Advertise BDRV_REQ_NO_FALLBACK in filter drivers 2019-03-26 11:37:51 +01:00
create.c
crypto.c block: Make bdrv_{copy_on_read,crypto_luks,replication} static 2019-03-19 15:49:29 +01:00
crypto.h
curl.c block/curl: Implement bdrv_refresh_filename() 2019-02-25 15:11:27 +01:00
dirty-bitmap.c bitmaps: Fix typo in function name 2019-03-12 12:05:49 -04:00
dmg-bz2.c
dmg-lzfse.c block: adding lzfse decompressing support as a module. 2018-12-14 11:52:40 +01:00
dmg.c dmg: don't skip zero chunk 2019-01-04 11:15:09 +00:00
dmg.h dmg: including dmg-lzfse module inside dmg block driver. 2018-12-14 11:52:40 +01:00
file-posix.c file-posix: Support BDRV_REQ_NO_FALLBACK for zero writes 2019-03-26 11:37:51 +01:00
file-win32.c avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
gluster.c gluster: the glfs_io_cbk callback function pointer adds pre/post stat args 2019-03-12 14:26:49 +01:00
io.c block: Add BDRV_REQ_NO_FALLBACK 2019-03-26 11:37:51 +01:00
iscsi-opts.c
iscsi.c block/iscsi: Restrict Linux-specific code 2019-03-11 16:33:49 +01:00
linux-aio.c avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
Makefile.objs configure: adding support to lzfse library. 2018-12-14 11:52:40 +01:00
mirror.c block: Advertise BDRV_REQ_NO_FALLBACK in filter drivers 2019-03-26 11:37:51 +01:00
nbd-client.c nbd/client: Trace server noncompliance on structured reads 2019-04-01 08:58:04 -05:00
nbd-client.h nbd: Restrict connection_co reentrance 2019-02-25 15:03:19 +01:00
nbd.c nbd/client: Lower min_block for block-status, unaligned size 2019-03-30 20:52:19 -05:00
nfs.c block: Purify .bdrv_refresh_filename() 2019-02-25 15:11:27 +01:00
null.c block/null: Generate filename even with latency-ns 2019-02-25 15:11:27 +01:00
nvme.c block/nvme: Fix bdrv_refresh_filename() 2019-02-25 15:11:27 +01:00
parallels.c block/parallels: use QEMU_IOVEC_INIT_BUF 2019-02-22 09:42:13 +00:00
parallels.h
qapi.c qapi: drop x- from x-block-latency-histogram-set 2019-03-12 20:30:08 +01:00
qcow2-bitmap.c block/qcow2-bitmap: Allow resizes with persistent bitmaps 2019-03-12 14:57:38 -04:00
qcow2-cache.c qcow2: External file I/O 2019-03-08 12:26:46 +01:00
qcow2-cluster.c qcow2: Implement data-file-raw create option 2019-03-08 12:26:46 +01:00
qcow2-refcount.c qcow2: Support external data file in qemu-img check 2019-03-08 12:26:46 +01:00
qcow2-snapshot.c qcow2: Return error for snapshot operation with data file 2019-03-08 12:26:46 +01:00
qcow2.c qcow2: Fix data file error condition in qcow2_co_create() 2019-03-19 15:49:29 +01:00
qcow2.h block/qcow2-bitmap: Allow resizes with persistent bitmaps 2019-03-12 14:57:38 -04:00
qcow.c Block layer patches: 2019-02-26 19:04:47 +00:00
qed-check.c
qed-cluster.c
qed-l2-cache.c
qed-table.c block/qed: use qemu_iovec_init_buf 2019-02-22 09:42:13 +00:00
qed.c Block layer patches: 2019-02-26 19:04:47 +00:00
qed.h
quorum.c block: Purify .bdrv_refresh_filename() 2019-02-25 15:11:27 +01:00
raw-format.c block: Advertise BDRV_REQ_NO_FALLBACK in filter drivers 2019-03-26 11:37:51 +01:00
rbd.c block: Add strong_runtime_opts to BlockDriver 2019-02-25 15:11:27 +01:00
replication.c block: Make bdrv_{copy_on_read,crypto_luks,replication} static 2019-03-19 15:49:29 +01:00
sheepdog.c block: Add strong_runtime_opts to BlockDriver 2019-02-25 15:11:27 +01:00
snapshot.c block/snapshot: remove bdrv_snapshot_delete_by_id_or_name 2019-02-25 15:03:18 +01:00
ssh.c block: Add strong_runtime_opts to BlockDriver 2019-02-25 15:11:27 +01:00
stream.c block: Freeze the backing chain for the duration of the stream job 2019-03-12 20:30:14 +01:00
throttle-groups.c throttle-groups: fix restart coroutine iothread race 2019-01-24 10:02:28 +00:00
throttle.c block: Add strong_runtime_opts to BlockDriver 2019-02-25 15:11:27 +01:00
trace-events nbd/client: Trace server noncompliance on structured reads 2019-04-01 08:58:04 -05:00
vdi.c block: Eliminate the S_1KiB, S_2KiB, ... macros 2019-02-01 13:46:45 +01:00
vhdx-endian.c
vhdx-log.c block: Use bdrv_refresh_filename() to pull 2019-02-25 15:11:25 +01:00
vhdx.c
vhdx.h qemu/queue.h: leave head structs anonymous unless necessary 2019-01-11 15:46:55 +01:00
vmdk.c vmdk: Support version=3 in VMDK descriptor files 2019-03-19 15:49:29 +01:00
vpc.c block: Add strong_runtime_opts to BlockDriver 2019-02-25 15:11:27 +01:00
vvfat.c block: Add strong_runtime_opts to BlockDriver 2019-02-25 15:11:27 +01:00
vxhs.c block: Add strong_runtime_opts to BlockDriver 2019-02-25 15:11:27 +01:00
win32-aio.c
write-threshold.c