qemu-devel
[Top][All Lists]
Advanced

[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: Kevin Wolf
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:30:39 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0

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 <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.

Have a look at VMDK to see how it's supposed to be done.

Kevin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]