diff options
author | Fam Zheng | 2014-05-23 15:29:47 +0200 |
---|---|---|
committer | Stefan Hajnoczi | 2014-05-28 14:28:46 +0200 |
commit | 826b6ca0b0c00bf27562a85bc073f800dad1259b (patch) | |
tree | 09e8976f3d060ef25ab1e5c08fdd8f639c6c2156 /include/block | |
parent | block: Use bdrv_set_backing_hd everywhere (diff) | |
download | qemu-826b6ca0b0c00bf27562a85bc073f800dad1259b.tar.gz qemu-826b6ca0b0c00bf27562a85bc073f800dad1259b.tar.xz qemu-826b6ca0b0c00bf27562a85bc073f800dad1259b.zip |
block: Add backing_blocker in BlockDriverState
This makes use of op_blocker and blocks all the operations except for
commit target, on each BlockDriverState->backing_hd.
The asserts for op_blocker in bdrv_swap are removed because with this
change, the target of block commit has at least the backing blocker of
its child, so the assertion is not true. Callers should do their check.
Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'include/block')
-rw-r--r-- | include/block/block_int.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/block/block_int.h b/include/block/block_int.h index 7b1c013c30..f2e753f632 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @@ -369,6 +369,9 @@ struct BlockDriverState { QDict *options; BlockdevDetectZeroesOptions detect_zeroes; + + /* The error object in use for blocking operations on backing_hd */ + Error *backing_blocker; }; int get_tmp_filename(char *filename, int size); |