提交 fa18da2d 编写于 作者: M Michal Privoznik

storage_util: Prefer generic FICLONE over btrfs/xfs defines

After my change to the original patch that resulted in commit
8ed874b3 it was brought to my attention that all three defines
are the same: FICLONE = BTRFS_IOC_CLONE = XFS_IOC_CLONE (as
documented in ioctl_ficlone(2)). Therefore we should prefer
generic FICLONE over 'specific' defines for btrfs/xfs.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
上级 986152e0
......@@ -46,14 +46,14 @@
# include <selinux/selinux.h>
#endif
#if HAVE_LINUX_BTRFS_H
#ifdef FICLONE
# define REFLINK_IOC_CLONE FICLONE
#elif HAVE_LINUX_BTRFS_H
# include <linux/btrfs.h>
# define REFLINK_IOC_CLONE BTRFS_IOC_CLONE
#elif HAVE_XFS_XFS_H
# include <xfs/xfs.h>
# define REFLINK_IOC_CLONE XFS_IOC_CLONE
#elif defined(FICLONE)
# define REFLINK_IOC_CLONE FICLONE
#endif
#include "datatypes.h"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册