qemu-block
[Top][All Lists]
Advanced

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

Re: [PATCH v4 02/30] qcow2: Convert qcow2_get_cluster_offset() into qcow


From: Alberto Garcia
Subject: Re: [PATCH v4 02/30] qcow2: Convert qcow2_get_cluster_offset() into qcow2_get_host_offset()
Date: Thu, 09 Apr 2020 16:35:26 +0200
User-agent: Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu)

On Thu 09 Apr 2020 09:57:59 AM CEST, Vladimir Sementsov-Ogievskiy wrote:
> What about squashing this:
>
> --- a/block/qcow2-cluster.c
> +++ b/block/qcow2-cluster.c
> @@ -615,32 +615,34 @@ int qcow2_get_host_offset(BlockDriverState *bs, 
> uint64_t offset,
>           break;
>       case QCOW2_CLUSTER_ZERO_ALLOC:
>       case QCOW2_CLUSTER_NORMAL:
> +    {
> +        uint64_t host_cluster_offset = l2_slice & L2E_OFFSET_MASK;
> +        *host_offset = host_cluster_offset + offset_in_cluster;

Ok, that looks good (I'll put the brace on the 'case' line though).

Berto



reply via email to

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