linux: implement filesystem-side copy/clone functions
commit5d12545da8c112aa813560950f39315956338963
authorRob Norris <rob.norris@klarasystems.com>
Tue, 27 Jun 2023 13:44:53 +0000 (27 23:44 +1000)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 26 Jul 2023 15:46:58 +0000 (26 08:46 -0700)
treea0c33d5f555bce52a49afbcab4fb1e93729e9079
parenta3ea8c8ee6d01aba0d15b4619b8641376fef57e2
linux: implement filesystem-side copy/clone functions

This implements the Linux VFS ops required to service the file
copy/clone APIs:

  .copy_file_range    (4.5+)
  .clone_file_range   (4.5-4.19)
  .dedupe_file_range  (4.5-4.19)
  .remap_file_range   (4.20+)

Note that dedupe_file_range() and remap_file_range(REMAP_FILE_DEDUP) are
hooked up here, but are not implemented yet.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Kay Pedersen <mail@mkwg.de>
Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
Sponsored-By: OpenDrives Inc.
Sponsored-By: Klara Inc.
Closes #15050
config/kernel-vfs-file_range.m4 [new file with mode: 0644]
config/kernel.m4
include/os/linux/zfs/sys/zpl.h
module/Kbuild.in
module/os/linux/zfs/zpl_file.c
module/os/linux/zfs/zpl_file_range.c [new file with mode: 0644]