On Thu, 06/29 14:53, Ashijeet Acharya wrote: > +/* > + * vmdk_handle_alloc > + * > + * Allocate new clusters for an area that either is yet unallocated or needs > a > + * copy on write. > + * > + * Returns: > + * VMDK_OK: if new clusters were allocated, *bytes may be decreased > if > + * the new allocation doesn't cover all of the requested > area. > + * *cluster_offset is updated to contain the offset of the > + * first newly allocated cluster. > + * > + * VMDK_UNALLOC: if no clusters could be allocated. *cluster_offset is > left > + * unchanged. > + * > + * VMDK_ERROR: in error cases > + */ > +static int vmdk_handle_alloc(BlockDriverState *bs, VmdkExtent *extent, > + uint64_t offset, uint64_t *cluster_offset, > + int64_t *bytes, VmdkMetaData *m_data, > + bool allocate, uint32_t *total_alloc_clusters)
This was renamed "alloc_clusters_counter" in v6, looks like somehow you reverted the change to v5. > +{ > + int l1_index, l2_offset, l2_index; > + uint32_t *l2_table; > + uint32_t cluster_sector; > + uint32_t nb_clusters; > + bool zeroed = false; > + uint64_t skip_start_bytes, skip_end_bytes; > + int ret; Fam