Re: [Qemu-devel] [PATCH v6 6/8] vmdk: New functions to assist allocating multiple clusters

2017-06-29 Thread Ashijeet Acharya
On Tue, Jun 27, 2017 at 1:32 PM, Fam Zheng wrote: > On Mon, 06/05 13:22, Ashijeet Acharya wrote: >> +/* >> + * vmdk_handle_alloc >> + * >> + * Allocate new clusters for an area that either is yet unallocated or >> needs a >> + * copy on write. If *cluster_offset is non_zero,

Re: [Qemu-devel] [PATCH v6 6/8] vmdk: New functions to assist allocating multiple clusters

2017-06-27 Thread Fam Zheng
On Mon, 06/05 13:22, Ashijeet Acharya wrote: > +/* > + * vmdk_handle_alloc > + * > + * Allocate new clusters for an area that either is yet unallocated or needs > a > + * copy on write. If *cluster_offset is non_zero, clusters are only > allocated if > + * the new allocation can match the

[Qemu-devel] [PATCH v6 6/8] vmdk: New functions to assist allocating multiple clusters

2017-06-05 Thread Ashijeet Acharya
Introduce two new helper functions handle_alloc() and vmdk_alloc_cluster_offset(). handle_alloc() helps to allocate multiple clusters at once starting from a given offset on disk and performs COW if necessary for first and last allocated clusters. vmdk_alloc_cluster_offset() helps to return the