blkdebug: Add @iotype error option
commit16789db3de64147c7271d30a9d379b2a8aa2b81e
authorMax Reitz <mreitz@redhat.com>
Tue, 7 May 2019 20:35:04 +0000 (7 22:35 +0200)
committerMax Reitz <mreitz@redhat.com>
Fri, 14 Jun 2019 12:16:57 +0000 (14 14:16 +0200)
treeecdce5e2bfa45ee6da0dec8b9ebe27030bcd7149
parent8eaac025fb43b16a38671e6b80e7059cd8af3403
blkdebug: Add @iotype error option

This new error option allows users of blkdebug to inject errors only on
certain kinds of I/O operations.  Users usually want to make a very
specific operation fail, not just any; but right now they simply hope
that the event that triggers the error injection is followed up with
that very operation.  That may not be true, however, because the block
layer is changing (including blkdebug, which may increase the number of
types of I/O operations on which to inject errors).

The new option's default has been chosen to keep backwards
compatibility.

Note that similar to the internal representation, we could choose to
expose this option as a list of I/O types.  But there is no practical
use for this, because as described above, users usually know exactly
which kind of operation they want to make fail, so there is no need to
specify multiple I/O types at once.  In addition, exposing this option
as a list would require non-trivial changes to qemu_opts_absorb_qdict().

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-id: 20190507203508.18026-4-mreitz@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
block/blkdebug.c
qapi/block-core.json