Re: [Qemu-devel] Different type of qcow2_get_cluster_type

2018-09-18 Thread Eric Blake
On 9/18/18 3:45 AM, lampahome wrote: Both values correspond to L2 entries with bit 0 set. However, QCOW2_CLUSTER_ZERO_ALLOC is an entry that has a non-zero value in bits 9-55 (the cluster has an allocated host location, we guarantee that things read as zero regardless of whether the host data

Re: [Qemu-devel] Different type of qcow2_get_cluster_type

2018-09-18 Thread lampahome
> > > Both values correspond to L2 entries with bit 0 set. However, > QCOW2_CLUSTER_ZERO_ALLOC is an entry that has a non-zero value in bits 9-55 > (the cluster has an allocated host location, we guarantee that things read > as zero regardless of whether the host data actually contains zeroes at

Re: [Qemu-devel] Different type of qcow2_get_cluster_type

2018-09-14 Thread Eric Blake
On 9/14/18 3:35 AM, lampahome wrote: The function qcow2_get_cluster_type() is in /block/qcow2.h It will return the flage based on the entry. There're some flags confused me. What's difference between QCOW2_CLUSTER_ZERO_ALLOC & QCOW2_CLUSTER_ZERO_PLAIN in there? Look at docs/interop/qcow2.txt

[Qemu-devel] Different type of qcow2_get_cluster_type

2018-09-14 Thread lampahome
The function qcow2_get_cluster_type() is in /block/qcow2.h It will return the flage based on the entry. There're some flags confused me. What's difference between QCOW2_CLUSTER_ZERO_ALLOC & QCOW2_CLUSTER_ZERO_PLAIN in there?