* btrfs.c (btrfs_ioctl): Skip BTRFS_IOC_FILE_EXTENT_SAME case
if this constant is not defined.
* tests/btrfs.c (btrfs_test_extent_same_ioctl): Skip this part
of the test if BTRFS_IOC_FILE_EXTENT_SAME is not defined.
case BTRFS_IOC_CLONE: /* FICLONE */
case BTRFS_IOC_CLONE_RANGE: /* FICLONERANGE */
+#ifdef BTRFS_IOC_FILE_EXTENT_SAME
case BTRFS_IOC_FILE_EXTENT_SAME: /* FIDEDUPERANGE */
+#endif
/*
* FICLONE, FICLONERANGE, and FIDEDUPERANGE started out as
* btrfs ioctls and the code was kept for the generic
static void
btrfs_test_extent_same_ioctl(void)
{
+#ifdef BTRFS_IOC_FILE_EXTENT_SAME
struct file_dedupe_range args = {
.src_offset = 1024,
.src_length = 10240,
close(fd2);
}
free(argsp);
+#endif /* BTRFS_IOC_FILE_EXTENT_SAME */
}
static void