aboutsummaryrefslogtreecommitdiff
path: root/block/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/io.c')
-rw-r--r--block/io.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/block/io.c b/block/io.c
index c03233a..cfc93dc 100644
--- a/block/io.c
+++ b/block/io.c
@@ -933,6 +933,8 @@ int coroutine_fn bdrv_co_pwrite_sync(BdrvChild *child, int64_t offset,
int ret;
IO_CODE();
+ assume_graph_lock(); /* FIXME */
+
ret = bdrv_co_pwrite(child, offset, bytes, buf, flags);
if (ret < 0) {
return ret;
@@ -1041,6 +1043,8 @@ static int coroutine_fn bdrv_driver_pwritev(BlockDriverState *bs,
QEMUIOVector local_qiov;
int ret;
+ assume_graph_lock(); /* FIXME */
+
bdrv_check_qiov_request(offset, bytes, qiov, qiov_offset, &error_abort);
if (!drv) {
@@ -1680,6 +1684,8 @@ static int coroutine_fn bdrv_co_do_pwrite_zeroes(BlockDriverState *bs,
int head = 0;
int tail = 0;
+ assume_graph_lock(); /* FIXME */
+
int64_t max_write_zeroes = MIN_NON_ZERO(bs->bl.max_pwrite_zeroes,
INT64_MAX);
int alignment = MAX(bs->bl.pwrite_zeroes_alignment,
@@ -2839,6 +2845,7 @@ int coroutine_fn bdrv_co_flush(BlockDriverState *bs)
int ret = 0;
IO_CODE();
+ assert_bdrv_graph_readable();
bdrv_inc_in_flight(bs);
if (!bdrv_co_is_inserted(bs) || bdrv_is_read_only(bs) ||