aboutsummaryrefslogtreecommitdiff
path: root/block/raw-format.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/raw-format.c')
-rw-r--r--block/raw-format.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/block/raw-format.c b/block/raw-format.c
index 66741be954..1111dffd54 100644
--- a/block/raw-format.c
+++ b/block/raw-format.c
@@ -95,9 +95,9 @@ end:
return ret;
}
-static int raw_apply_options(BlockDriverState *bs, BDRVRawState *s,
- uint64_t offset, bool has_size, uint64_t size,
- Error **errp)
+static int GRAPH_RDLOCK
+raw_apply_options(BlockDriverState *bs, BDRVRawState *s, uint64_t offset,
+ bool has_size, uint64_t size, Error **errp)
{
int64_t real_size = 0;
@@ -145,6 +145,9 @@ static int raw_reopen_prepare(BDRVReopenState *reopen_state,
uint64_t offset, size;
int ret;
+ GLOBAL_STATE_CODE();
+ GRAPH_RDLOCK_GUARD_MAINLOOP();
+
assert(reopen_state != NULL);
assert(reopen_state->bs != NULL);