[libvirt] [PATCH 1/2] Introduce btrfsCloneFile for btrfs COW copy

Ján Tomko jtomko at redhat.com
Wed Jan 21 12:16:13 UTC 2015


On 01/21/2015 08:06 AM, Chen, Hanxiao wrote:
> 
> 
>> -----Original Message-----
>> From: libvir-list-bounces at redhat.com [mailto:libvir-list-bounces at redhat.com] On
>> Behalf Of Chen, Hanxiao
>> Sent: Monday, January 19, 2015 2:26 PM
>> To: Ján Tomko; libvir-list at redhat.com
>> Subject: Re: [libvirt] [PATCH 1/2] Introduce btrfsCloneFile for btrfs COW copy
>>
>>
>>
>>> -----Original Message-----
>>> From: Ján Tomko [mailto:jtomko at redhat.com]
>>> Sent: Friday, January 16, 2015 10:21 PM
>>> To: Chen, Hanxiao/陈 晗霄; libvir-list at redhat.com
> [snip]
>>>> +#define BTRFS_IOC_CLONE _IOW (BTRFS_IOCTL_MAGIC, 9, int)
>>>> +
>>>
>>> Instead of redefining the constants, can we check for btrfs.h at configure
>>> time and wrap the function in #ifdef BTRFS_IOC_CLONE ?
>>>
>> We need to install btrfs-progs-devel for BTRFS_IOC_CLONE in <btrfs/ioctl.h>.
>> So it should be easy to just define magic number and issue a ioctl,
>> than add a dependency on btrfs-progs-devel.
>>
>> Do we need to add a LIBVIRT_CHECK_PKG for btrfs-progs-devel?
>>

I can see BTRFS_IOC_CLONE in linux/btrfs.h, which is part of kernel-headers on
RHEL 7.

Anyway, we should be checking for the header file via AC_CHECK_HEADER
(preferably only when we're building with the storage driver that will use
it), not a distro-specific package name.

Jan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150121/d95e8d1c/attachment-0001.sig>


More information about the libvir-list mailing list