qemu-block
[Top][All Lists]
Advanced

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

Re: [PATCH v4 01/30] qcow2: Make Qcow2AioTask store the full host offset


From: Eric Blake
Subject: Re: [PATCH v4 01/30] qcow2: Make Qcow2AioTask store the full host offset
Date: Wed, 18 Mar 2020 06:23:56 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0

On 3/17/20 1:15 PM, Alberto Garcia wrote:
The file_cluster_offset field of Qcow2AioTask stores a cluster-aligned
host offset. In practice this is not very useful because all users(*)
of this structure need the final host offset into the cluster, which
they calculate using

    host_offset = file_cluster_offset + offset_into_cluster(s, offset)

There is no reason why Qcow2AioTask cannot store host_offset directly
and that is what this patch does.

(*) compressed clusters are the exception: in this case what
     file_cluster_offset was storing was the full compressed cluster
     descriptor (offset + size). This does not change with this patch
     but it is documented now.

Signed-off-by: Alberto Garcia <address@hidden>
---
  block/qcow2.c | 68 +++++++++++++++++++++++++--------------------------
  1 file changed, 33 insertions(+), 35 deletions(-)


Reviewed-by: Eric Blake <address@hidden>

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org




reply via email to

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