summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/file.c
diff options
context:
space:
mode:
authorZach Brown <zab@redhat.com>2015-11-10 16:53:32 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2015-12-01 14:00:54 -0500
commit3db11b2eecc02dc0eee943e71822c6d929281aa7 (patch)
tree4c3e92e765c730a4b6a4acc4c444e043fd66c573 /fs/btrfs/file.c
parentcb4c4e8091e86e08cb2d48e7ae6bf454245c36cb (diff)
downloadop-kernel-dev-3db11b2eecc02dc0eee943e71822c6d929281aa7.zip
op-kernel-dev-3db11b2eecc02dc0eee943e71822c6d929281aa7.tar.gz
btrfs: add .copy_file_range file operation
This rearranges the existing COPY_RANGE ioctl implementation so that the .copy_file_range file operation can call the core loop that copies file data extent items. The extent copying loop is lifted up into its own function. It retains the core btrfs error checks that should be shared. Signed-off-by: Zach Brown <zab@redhat.com> [Anna Schumaker: Make flags an unsigned int, Check for COPY_FR_REFLINK] Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> Reviewed-by: Josef Bacik <jbacik@fb.com> Reviewed-by: David Sterba <dsterba@suse.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/btrfs/file.c')
-rw-r--r--fs/btrfs/file.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index 72e7346..e67fe6a 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -2924,6 +2924,7 @@ const struct file_operations btrfs_file_operations = {
#ifdef CONFIG_COMPAT
.compat_ioctl = btrfs_ioctl,
#endif
+ .copy_file_range = btrfs_copy_file_range,
};
void btrfs_auto_defrag_exit(void)
OpenPOWER on IntegriCloud