• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

修订版1adb0b5e0f7c5c4f707b1ffa98e2b15ef51ebbc5 (tree)
时间2019-06-14 21:16:57
作者Max Reitz <mreitz@redh...>
CommiterMax Reitz

Log Message

blkdebug: Inject errors on .bdrv_co_block_status()

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-id: 20190507203508.18026-6-mreitz@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>

更改概述

差异

--- a/block/blkdebug.c
+++ b/block/blkdebug.c
@@ -670,7 +670,15 @@ static int coroutine_fn blkdebug_co_block_status(BlockDriverState *bs,
670670 int64_t *map,
671671 BlockDriverState **file)
672672 {
673+ int err;
674+
673675 assert(QEMU_IS_ALIGNED(offset | bytes, bs->bl.request_alignment));
676+
677+ err = rule_check(bs, offset, bytes, BLKDEBUG_IO_TYPE_BLOCK_STATUS);
678+ if (err) {
679+ return err;
680+ }
681+
674682 return bdrv_co_block_status_from_file(bs, want_zero, offset, bytes,
675683 pnum, map, file);
676684 }
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -3281,10 +3281,13 @@
32813281 #
32823282 # @flush: .bdrv_co_flush_to_disk()
32833283 #
3284+# @block-status: .bdrv_co_block_status()
3285+#
32843286 # Since: 4.1
32853287 ##
32863288 { 'enum': 'BlkdebugIOType', 'prefix': 'BLKDEBUG_IO_TYPE',
3287- 'data': [ 'read', 'write', 'write-zeroes', 'discard', 'flush' ] }
3289+ 'data': [ 'read', 'write', 'write-zeroes', 'discard', 'flush',
3290+ 'block-status' ] }
32883291
32893292 ##
32903293 # @BlkdebugInjectErrorOptions: