[libvirt] [PATCH RFC] storage: perform btrfs clone if possible

Chen, Hanxiao chenhanxiao at cn.fujitsu.com
Tue Nov 25 10:19:00 UTC 2014



> -----Original Message-----
> From: Eric Blake [mailto:eblake at redhat.com]
> Sent: Tuesday, November 25, 2014 12:25 AM
> To: Martin Kletzander; Chen, Hanxiao/陈 晗霄
> Cc: libvir-list at redhat.com
> Subject: Re: [libvirt] [PATCH RFC] storage: perform btrfs clone if possible
> 
> On 11/24/2014 12:09 AM, Martin Kletzander wrote:
> > On Mon, Nov 24, 2014 at 02:11:47PM +0800, Chen Hanxiao wrote:
> >> We already had nocow flags in virStorageSource.
> >> But when creating RAW file, we don't take advantage
> >> of clone of btrfs.
> >> This file introduce btrfs_clone_file function,
> >> and try to use it when !nocow.
> >>
> >
> > I'm not sure we want to do this, but I have nothing against that
> > either.  So I'll just review the code without any other comments.
> >
> 
> >
> > As I said, I'm not commenting on whether we want this in or not, so
> > for that you should wait for someone's response.  I bet there's a
> > (good) reason behind libvirt not using some lvm/zfs/btrfs features,
> > but I am too lazy to search for it since it'd be inaccurate anyway.
> 
> I think it makes sense to expose this functionality; although I suspect
> it is better if we do so by having the user pass an explicit new flag
> value to existing API instead of doing it automatically.
> 
Thanks for your clarification.

But we've already had nocow in virStorageSource and <nocow> tags.
So I think if we do not specify <nocow> tags in XML,
we should try it according to 'nocow' in codes.

Or do we need a new flags such as --reflink
for tools like virt-clone?

Thanks,
- Chen




More information about the libvir-list mailing list