]> git.ipfire.org Git - thirdparty/libvirt.git/commit
storage: Use the FICLONE ioctl unconditionally on Linux
authorAndrea Bolognani <abologna@redhat.com>
Tue, 28 Dec 2021 18:08:00 +0000 (19:08 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Tue, 4 Jan 2022 14:45:45 +0000 (15:45 +0100)
commit59d21d2c2e7bc24f848cdc750b0151087e94bafe
tree61dadb7c64fd053ad66b0714de0d133c60d1bfe8
parent5cd76ef97fedaebbd97b3e96e8422a41d1075a81
storage: Use the FICLONE ioctl unconditionally on Linux

According to ioctl_ficlonerange(2)

  These ioctl operations [FICLONE and FICLONERANGE] first
  appeared in Linux 4.5. They were previously known as
  BTRFS_IOC_CLONE and BTRFS_IOC_CLONE_RANGE, and were private
  to Btrfs.

We no longer target any distro that comes with a kernel older
than 4.5, so we can stop looking for the btrfs and xfs
specific versions of the constant and just use the generic
version directly.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/storage/storage_util.c