aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2023-02-03 16:21:52 +0100
committerKevin Wolf <kwolf@redhat.com>2023-02-23 19:49:19 +0100
commiteeb4777544e41106c85146a96e16da14ab13110f (patch)
tree762dbb5239f6bf178e0da4a0017ecbf665ae8220 /block
parentb24a4c41ba804f2f465adbc0ab57854cba4868e1 (diff)
block: Mark bdrv_co_do_pwrite_zeroes() GRAPH_RDLOCK
All callers are already GRAPH_RDLOCK, so just add the annotation and remove assume_graph_lock(). Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20230203152202.49054-14-kwolf@redhat.com> Reviewed-by: Emanuele Giuseppe Esposito <eesposit@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block')
-rw-r--r--block/io.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/block/io.c b/block/io.c
index 2593823f62..628b350002 100644
--- a/block/io.c
+++ b/block/io.c
@@ -1672,8 +1672,9 @@ fail:
return ret;
}
-static int coroutine_fn bdrv_co_do_pwrite_zeroes(BlockDriverState *bs,
- int64_t offset, int64_t bytes, BdrvRequestFlags flags)
+static int coroutine_fn GRAPH_RDLOCK
+bdrv_co_do_pwrite_zeroes(BlockDriverState *bs, int64_t offset, int64_t bytes,
+ BdrvRequestFlags flags)
{
BlockDriver *drv = bs->drv;
QEMUIOVector qiov;
@@ -1683,8 +1684,6 @@ 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,