Revision 6377af48 block/qcow2.h

b/block/qcow2.h
43 43
#define QCOW_OFLAG_COPIED     (1LL << 63)
44 44
/* indicate that the cluster is compressed (they never have the copied flag) */
45 45
#define QCOW_OFLAG_COMPRESSED (1LL << 62)
46
/* The cluster reads as all zeros */
47
#define QCOW_OFLAG_ZERO (1LL << 0)
46 48

  
47 49
#define REFCOUNT_SHIFT 1 /* refcount size is 2 bytes */
48 50

  
......
184 186
    QCOW2_CLUSTER_UNALLOCATED,
185 187
    QCOW2_CLUSTER_NORMAL,
186 188
    QCOW2_CLUSTER_COMPRESSED,
189
    QCOW2_CLUSTER_ZERO
187 190
};
188 191

  
189 192
#define L1E_OFFSET_MASK 0x00ffffffffffff00ULL
......
213 216
{
214 217
    if (l2_entry & QCOW_OFLAG_COMPRESSED) {
215 218
        return QCOW2_CLUSTER_COMPRESSED;
219
    } else if (l2_entry & QCOW_OFLAG_ZERO) {
220
        return QCOW2_CLUSTER_ZERO;
216 221
    } else if (!(l2_entry & L2E_OFFSET_MASK)) {
217 222
        return QCOW2_CLUSTER_UNALLOCATED;
218 223
    } else {

Also available in: Unified diff