While working on NBD, I found myself cursing the qemu-io UI for not letting me test various scenarios, particularly after fixing NBD to serve at byte granularity [1]. And in the process of writing these qemu-io enhancements, I also managed to flush out several other bugs in the block layer proper, with fixes posted separately, such as loss of BDRV_REQ_FUA during write_zeroes [2]
2.7 material, depends on Kevin's block-next: git://repo.or.cz/qemu/kevin.git block-next and on my pending "block: kill sector-based blk_write/read" v7 or later https://lists.gnu.org/archive/html/qemu-devel/2016-05/msg00895.html Previously posted as part of a larger v3 NBD series [3] and as a separate v4 [4], so this is v5. [1] commit df7b97ff [2] https://lists.gnu.org/archive/html/qemu-devel/2016-05/msg00285.html [3] https://lists.gnu.org/archive/html/qemu-devel/2016-04/msg03526.html [4] https://lists.gnu.org/archive/html/qemu-devel/2016-05/msg00619.html Also available as a tag at this location: git fetch git://repo.or.cz/qemu/ericb.git nbd-qemu-io-v5 Changes since then: - patch 1: add more cleanups (R-b dropped) - patch 2 (was 5/6) hoist earlier, retitle, use -dMODE instead of inventing -u [mreitz], add -k and -tMODE - patch 4 (was 3/6) fix bool usage, drop spurious usage space [mreitz] - patch 5 (was 4/6) fix bool usage [mreitz] - patch 6 rebase to earlier changes (R-b kept) 001/6:[0011] [FC] 'qemu-io: Add missing option documentation' 002/6:[down] 'qemu-io: Make 'open' subcommand more like command line' 003/6:[----] [--] 'qemu-io: Use bool for command line flags' 004/6:[0022] [FC] 'qemu-io: Allow unaligned access by default' 005/6:[0014] [FC] 'qemu-io: Add 'write -f' to test FUA flag' 006/6:[0008] [FC] 'qemu-io: Add 'write -z -u' to test MAY_UNMAP flag' Eric Blake (6): qemu-io: Add missing option documentation qemu-io: Make 'open' subcommand more like command line qemu-io: Use bool for command line flags qemu-io: Allow unaligned access by default qemu-io: Add 'write -f' to test FUA flag qemu-io: Add 'write -z -u' to test MAY_UNMAP flag qemu-io-cmds.c | 228 ++--- qemu-io.c | 40 +- tests/qemu-iotests/023.out | 2160 +++++++++++++++++++++++++++++--------------- 3 files changed, 1587 insertions(+), 841 deletions(-) -- 2.5.5