Signed-off-by: Benoit Canet <ben...@irqsave.net> --- block/quorum.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
diff --git a/block/quorum.c b/block/quorum.c index 0217593..d6fef58 100644 --- a/block/quorum.c +++ b/block/quorum.c @@ -797,6 +797,25 @@ free_new_s_exit: quorum_free(&new_s); } +static int quorum_snapshot_reopen(BlockDriverState *bs, int bdrv_flags, + Error **errp) +{ + BDRVQuorumState *s = bs->file->opaque; + int i, ret = -1; + Error *local_err = NULL; + BlockReopenQueue *queue = NULL; + + for (i = 0; i < s->total; i++) { + queue = bdrv_reopen_queue(queue, s->bs[i], bdrv_flags); + } + + ret = bdrv_reopen_multiple(queue, &local_err); + if (local_err != NULL) { + error_propagate(errp, local_err); + } + return ret; +} + static BlockDriver bdrv_quorum = { .format_name = "quorum", .protocol_name = "quorum", @@ -813,6 +832,7 @@ static BlockDriver bdrv_quorum = { .bdrv_co_is_allocated = quorum_co_is_allocated, .bdrv_ext_snapshot_img_create = quorum_snapshot_img_create, + .bdrv_ext_snapshot_reopen = quorum_snapshot_reopen, }; static void bdrv_quorum_init(void) -- 1.7.10.4