diff options
Diffstat (limited to 'block/rbd.c')
-rw-r--r-- | block/rbd.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/block/rbd.c b/block/rbd.c index 073bc92e39..84bb2fa5d7 100644 --- a/block/rbd.c +++ b/block/rbd.c @@ -1168,7 +1168,9 @@ static int qemu_rbd_open(BlockDriverState *bs, QDict *options, int flags, /* If we are using an rbd snapshot, we must be r/o, otherwise * leave as-is */ if (s->snap != NULL) { + bdrv_graph_rdlock_main_loop(); r = bdrv_apply_auto_read_only(bs, "rbd snapshots are read-only", errp); + bdrv_graph_rdunlock_main_loop(); if (r < 0) { goto failed_post_open; } |