[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v7 6/8] vmdk: New functions to assist allocating
From: |
Fam Zheng |
Subject: |
Re: [Qemu-block] [PATCH v7 6/8] vmdk: New functions to assist allocating multiple clusters |
Date: |
Thu, 27 Jul 2017 20:48:59 +0800 |
User-agent: |
Mutt/1.8.3 (2017-05-23) |
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-block] [PATCH v7 6/8] vmdk: New functions to assist allocating multiple clusters,
Fam Zheng <=