qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v4 11/15] block: Clean up reopen_backing_file()


From: Max Reitz
Subject: Re: [Qemu-devel] [PATCH v4 11/15] block: Clean up reopen_backing_file() in block/replication.c
Date: Sun, 11 Nov 2018 21:31:35 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0

On 07.11.18 13:59, Alberto Garcia wrote:
> This function is used to put the hidden and secondary disks in
> read-write mode before launching the backup job, and back in read-only
> mode afterwards.
> 
> This patch does the following changes:
> 
>   - Use an options QDict with the "read-only" option instead of
>     passing the changes as flags only.
> 
>   - Simplify the code (it was unnecessarily complicated and verbose).
> 
>   - Fix a bug due to which the secondary disk was not being put back
>     in read-only mode when writable=false (because in this case
>     orig_secondary_flags always had the BDRV_O_RDWR flag set).
> 
>   - Stop clearing the BDRV_O_INACTIVE flag.
> 
> The flags parameter to bdrv_reopen_queue() becomes redundant and we'll
> be able to get rid of it in a subsequent patch.
> 
> Signed-off-by: Alberto Garcia <address@hidden>
> ---
>  block/replication.c | 45 +++++++++++++++++++++------------------------
>  1 file changed, 21 insertions(+), 24 deletions(-)

Reviewed-by: Max Reitz <address@hidden>

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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