qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC][PATCH 0/7] blkdebug
@ 2010-03-15 17:08 Kevin Wolf
  2010-03-15 17:08 ` [Qemu-devel] [RFC][PATCH 1/7] qemu-config: qemu_read_config_file() reads the normal config file Kevin Wolf
                   ` (7 more replies)
  0 siblings, 8 replies; 19+ messages in thread
From: Kevin Wolf @ 2010-03-15 17:08 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf

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
bdrv_debug_event: 4
blkdebug_debug_event: 4
write failed: Input/output error

Basically what I think is left to do is:
- Resolve TODOs and FIXMEs left in the code
- Require blkdebug to be explicitly enabled before compiling in event
  generation (not sure if it really matters)
- Add more events, they are only added for qcow2-clusters so far
- Address your comments (if any)

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               |   13 ++
 block.h               |   28 ++++
 block/blkdebug.c      |  423 +++++++++++++++++++++++++++++++++++++++++++++++++
 block/qcow2-cluster.c |   15 ++
 block_int.h           |    2 +
 hw/qdev-properties.c  |   19 ++-
 hw/qdev.h             |    1 -
 qemu-config.c         |   45 +++---
 qemu-config.h         |    4 +-
 vl.c                  |   34 ++---
 11 files changed, 540 insertions(+), 50 deletions(-)
 create mode 100644 block/blkdebug.c

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2010-03-29  8:01 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-15 17:08 [Qemu-devel] [RFC][PATCH 0/7] blkdebug Kevin Wolf
2010-03-15 17:08 ` [Qemu-devel] [RFC][PATCH 1/7] qemu-config: qemu_read_config_file() reads the normal config file Kevin Wolf
2010-03-28 12:19   ` Christoph Hellwig
2010-03-15 17:08 ` [Qemu-devel] [RFC][PATCH 2/7] qemu-config: Make qemu_config_parse more generic Kevin Wolf
2010-03-28 12:20   ` Christoph Hellwig
2010-03-15 17:08 ` [Qemu-devel] [RFC][PATCH 3/7] blkdebug: Basic request passthrough Kevin Wolf
2010-03-28 12:24   ` Christoph Hellwig
2010-03-15 17:08 ` [Qemu-devel] [RFC][PATCH 4/7] blkdebug: Inject errors Kevin Wolf
2010-03-28 12:25   ` Christoph Hellwig
2010-03-15 17:08 ` [Qemu-devel] [RFC][PATCH 5/7] Make qemu-config available for tools Kevin Wolf
2010-03-28 12:34   ` Christoph Hellwig
2010-03-15 17:08 ` [Qemu-devel] [RFC][PATCH 6/7] blkdebug: Add events and rules Kevin Wolf
2010-03-28 13:12   ` Christoph Hellwig
2010-03-29  8:00     ` Kevin Wolf
2010-03-15 17:08 ` [Qemu-devel] [RFC][PATCH 7/7] qcow2: Trigger blkdebug events Kevin Wolf
2010-03-28 13:22   ` Christoph Hellwig
2010-03-15 17:40 ` [Qemu-devel] [RFC][PATCH 0/7] blkdebug Blue Swirl
2010-03-15 17:55   ` Kevin Wolf
2010-03-15 18:17     ` Blue Swirl

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).