Am 29.01.2013 14:09, schrieb Benoît Canet: > Le Tuesday 29 Jan 2013 à 13:22:12 (+0100), Kevin Wolf a écrit : >> Am 28.01.2013 18:04, schrieb Benoît Canet: >>> Protocols like quorum will be able to queue multiple reopens. >>> >>> Signed-off-by: Benoit Canet <ben...@irqsave.net> >> >> -EPARSE for the subject line. >> >> Also, what's the difference between this and a normal reopen? > > With this patch protocols like quorum can do something like : > > +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; > +} > > It allows to handle the reopening of multiple bs without duplicating a part of > bdrv_reopen_multiple's code.
Have a look at VMDK to see how it's supposed to be done. Kevin