[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH V2 4/4] block: Optionally block drivers to optio
From: |
Benoît Canet |
Subject: |
Re: [Qemu-devel] [PATCH V2 4/4] block: Optionally block drivers to optionally reopen images after snapshot creation. |
Date: |
Tue, 29 Jan 2013 14:09:57 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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 <address@hidden>
>
> -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.
Benoît
>
> Kevin
>
- Re: [Qemu-devel] [PATCH V2 2/4] block: make path_hash_protocol public., (continued)
[Qemu-devel] [PATCH V2 4/4] block: Optionally block drivers to optionally reopen images after snapshot creation., Benoît Canet, 2013/01/28