RE: [PATCH] kvm tools, qcow: Add the support for copy-on-write clusters

2011-11-21 Thread Lan, Tianyu
...@gmail.com; kw...@redhat.com Subject: Re: [PATCH] kvm tools, qcow: Add the support for copy-on-write clusters On Mon, Nov 21, 2011 at 9:12 AM, Lan Tianyu wrote: > +/*Allocate clusters according to the size. Find a postion that > + *can satisfy the size. free_clust_idx is initialized to ze

Re: [PATCH] kvm tools, qcow: Add the support for copy-on-write clusters

2011-11-21 Thread Pekka Enberg
On Mon, Nov 21, 2011 at 9:12 AM, Lan Tianyu wrote: > +/*Allocate clusters according to the size. Find a postion that > + *can satisfy the size. free_clust_idx is initialized to zero and > + *Record last position. > +*/ Can you please fix up your comments to use the following standard kernel style

Re: [PATCH] kvm tools, qcow: Add the support for copy-on-write clusters

2011-11-21 Thread Kevin Wolf
Am 21.11.2011 08:12, schrieb Lan Tianyu: > When meeting request to write the cluster without copied flag, > allocate a new cluster and write original data with modification > to the new cluster. This also adds support for the writing operation > of the qcow2 compressed image. After testing, image f

Re: [RFC v2 PATCH] kvm tools, qcow: Add the support for copy-on-write clusters

2011-11-21 Thread Kevin Wolf
Am 20.11.2011 11:59, schrieb Pekka Enberg: > On Sun, 2011-11-20 at 14:14 +0800, Lan, Tianyu wrote: >>> OK. Thx. >>> But fsync is too slow. I try to find a way to sync a range of file. >>> Are there any solutions to meet my purpose? > > On Sun, 2011-11-20 at 08:23 +0200, Sasha Levin wrote: >> fdat

[PATCH] kvm tools, qcow: Add the support for copy-on-write clusters

2011-11-20 Thread Lan Tianyu
When meeting request to write the cluster without copied flag, allocate a new cluster and write original data with modification to the new cluster. This also adds support for the writing operation of the qcow2 compressed image. After testing, image file can pass through "qemu-img check". The perfor

RE: [RFC v2 PATCH] kvm tools, qcow: Add the support for copy-on-write clusters

2011-11-20 Thread Pekka Enberg
On Sun, 2011-11-20 at 14:14 +0800, Lan, Tianyu wrote: > > OK. Thx. > > But fsync is too slow. I try to find a way to sync a range of file. > > Are there any solutions to meet my purpose? On Sun, 2011-11-20 at 08:23 +0200, Sasha Levin wrote: > fdatasync() is as good as it'll get. > > tbh, maybe w

RE: [RFC v2 PATCH] kvm tools, qcow: Add the support for copy-on-write clusters

2011-11-19 Thread Lan, Tianyu
...@gmail.com; prasadjoshi...@gmail.com Subject: RE: [RFC v2 PATCH] kvm tools, qcow: Add the support for copy-on-write clusters On Sun, 2011-11-20 at 14:14 +0800, Lan, Tianyu wrote: > OK. Thx. > But fsync is too slow. I try to find a way to sync a range of file. > Are there any solutions t

RE: [RFC v2 PATCH] kvm tools, qcow: Add the support for copy-on-write clusters

2011-11-19 Thread Sasha Levin
he...@gmail.com; prasadjoshi...@gmail.com > Subject: RE: [RFC v2 PATCH] kvm tools, qcow: Add the support for > copy-on-write clusters > > On Sat, 2011-11-19 at 23:30 +0800, Lan, Tianyu wrote: > > How about using the sync_file_range to sync the metadata? > > sync

RE: [RFC v2 PATCH] kvm tools, qcow: Add the support for copy-on-write clusters

2011-11-19 Thread Lan, Tianyu
...@kernel.org; kvm@vger.kernel.org; asias.he...@gmail.com; prasadjoshi...@gmail.com Subject: RE: [RFC v2 PATCH] kvm tools, qcow: Add the support for copy-on-write clusters On Sat, 2011-11-19 at 23:30 +0800, Lan, Tianyu wrote: > How about using the sync_file_range to sync the metad

RE: [RFC v2 PATCH] kvm tools, qcow: Add the support for copy-on-write clusters

2011-11-19 Thread Sasha Levin
On Sat, 2011-11-19 at 23:30 +0800, Lan, Tianyu wrote: > How about using the sync_file_range to sync the metadata? sync_file_range() is only a hint, it doesn't actually assure anything. -- Sasha. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to major

RE: [RFC v2 PATCH] kvm tools, qcow: Add the support for copy-on-write clusters

2011-11-19 Thread Lan, Tianyu
...@gmail.com; levinsasha...@gmail.com; prasadjoshi...@gmail.com Subject: RE: [RFC v2 PATCH] kvm tools, qcow: Add the support for copy-on-write clusters Hi Kevin: Thanks for your review. The following means that there should be a fsync after updating metadata(refcunt block, l1 table and l2

RE: [RFC v2 PATCH] kvm tools, qcow: Add the support for copy-on-write clusters

2011-11-18 Thread Lan, Tianyu
Hi Kevin: Thanks for your review. The following means that there should be a fsync after updating metadata(refcunt block, l1 table and l2 table). Thanks Tianyu Lan -Original Message- > + /*write l2 table*/ > + l2t->dirty = 1; > + if (qcow_l2_

Re: [RFC v2 PATCH] kvm tools, qcow: Add the support for copy-on-write clusters

2011-11-18 Thread Kevin Wolf
Am 18.11.2011 09:47, schrieb Lan Tianyu: > When meeting request to write the cluster without copied flag, > allocate a new cluster and write original data with modification > to the new cluster. This also adds support for the writing operation > of the qcow2 compressed image. After testing, image f

[RFC v2 PATCH] kvm tools, qcow: Add the support for copy-on-write clusters

2011-11-18 Thread Lan Tianyu
When meeting request to write the cluster without copied flag, allocate a new cluster and write original data with modification to the new cluster. This also adds support for the writing operation of the qcow2 compressed image. After testing, image file can pass through "qemu-img check". Please e

Re: [RFC PATCH] kvm tools, qcow: Add the support for copy-on-write clusters

2011-11-17 Thread Pekka Enberg
Hi, (I'm Cc'ing Prasad too.) On Thu, Nov 17, 2011 at 9:50 AM, Lan Tianyu wrote: > When meeting request to write the cluster without copied flag, > allocate a new cluster and write original data with modification > to the new cluster. This also can add support for the writing > operation of the q

[RFC PATCH] kvm tools, qcow: Add the support for copy-on-write clusters

2011-11-16 Thread Lan Tianyu
When meeting request to write the cluster without copied flag, allocate a new cluster and write original data with modification to the new cluster. This also can add support for the writing operation of the qcow2 compressed image. Signed-off-by: Lan Tianyu --- tools/kvm/disk/qcow.c| 322