Skip to content

blkdebug

Kevin Wolf qemu-devel 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest7 patches 0 repliesNew
  2. v17 patches 0 repliesSuperseded

Changes in v2 from the cover letter

- Another rebase
- Fixed memleak in blkdebug_open

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7qemu-config: qemu_read_config_file() reads the normal config fileqemu-config.c qemu-config.h vl.c+29 -240 replies
2/7qemu-config: Make qemu_config_parse more genericqemu-config.c qemu-config.h+13 -70 replies
3/7blkdebug: Basic request passthroughMakefile.objs block/blkdebug.c+105 -10 replies
4/7blkdebug: Inject errorsblock/blkdebug.c+81 -00 replies
5/7Make qemu-config available for toolsMakefile.objs hw/qdev-properties.c hw/qdev.h +1 more+20 -210 replies
6/7blkdebug: Add events and rulesblock.c block.h block/blkdebug.c +1 more+272 -10 replies
7/7qcow2: Trigger blkdebug eventsblock.h block/blkdebug.c block/qcow2-cluster.c +2 more+125 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [Qemu-devel] [PATCH v2 0/7] blkdebug

This patch series introduces a new block driver which acts as a protocol and whose purpose it is to fail requests. To be more precise, I want it to fail in configurable places, so that qemu-iotests can be extended with tests for the error paths (for example for the case when something with metadata writes goes wrong deep in qcow2).

It works like this (I think this is self-explanatory):

$ cat /tmp/blkdebug.cfg
[inject-error]
event = "l1_update"
errno = "5"
immediately = "on"
$ qemu-io blkdebug:/tmp/blkdebug.cfg:/tmp/empty.qcow2
qemu-io> read 0 4k
read 4096/4096 bytes at offset 0
4 KiB, 1 ops; 0.0000 sec (195.312 MiB/sec and 50000.0000 ops/sec)
qemu-io> write 0 4k
write failed: Input/output error

Changes in comparison to the RFC:
- Had to rebase qemu-config changes
- Code cleanup (including resolving TODOs and FIXMEs)
- More events all over qcow2
- No debug messages on stderr any more

v2:
- Another rebase
- Fixed memleak in blkdebug_open

Kevin Wolf (7):
qemu-config: qemu_read_config_file() reads the normal config file
qemu-config: Make qemu_config_parse more generic
blkdebug: Basic request passthrough
blkdebug: Inject errors
Make qemu-config available for tools
blkdebug: Add events and rules
qcow2: Trigger blkdebug events

 Makefile.objs          |    6 +-
 block.c                |   12 ++
 block.h                |   53 ++++++
 block/blkdebug.c       |  475 ++++++++++++++++++++++++++++++++++++++++++++++++
 block/qcow2-cluster.c  |   15 ++
 block/qcow2-refcount.c |   18 ++
 block/qcow2.c          |    6 +
 block_int.h            |    2 +
 hw/qdev-properties.c   |   19 ++-
 hw/qdev.h              |    1 -
 qemu-config.c          |   48 +++---
 qemu-config.h          |    4 +-
 vl.c                   |   38 ++---
 13 files changed, 644 insertions(+), 53 deletions(-)
 create mode 100644 block/blkdebug.c