[PATCH 0/9] vfs: move btrfs clone ioctls to common code

2015-10-24 Thread Peng Tao
Hi all, This patchset moves BTRFS_IOC_CLONE/BTRFS_IOC_CLONE_RANGE to common vfs layer and adds NFS42 CLONE support to knfsd. It is based on top of Trond's linux-next branch (a85240d254) and Anna's latest sys_copy_file_range work (v7). With this, btrfs/cifs/nfs all handle CLONE/CLONE_RANGE

[PATCH 1/9] vfs: add COPY_FILE_CLONE_ONLY flag

2015-10-24 Thread Peng Tao
To tell file system not to return partial success in the .copy_file_range method. This is useful to implement the clone (or reflink) functionality. COPY_FILE_CLONE_ONLY is added only to include/linux/fs.h and thus is not exposed to users. We can replace it with something like Anna's

[PATCH 3/9] nfs42: add .copy_file_range file operation

2015-10-24 Thread Peng Tao
Signed-off-by: Peng Tao --- fs/nfs/nfs4file.c | 95 ++- 1 file changed, 52 insertions(+), 43 deletions(-) diff --git a/fs/nfs/nfs4file.c b/fs/nfs/nfs4file.c index 4aa5719..f1924d8 100644 --- a/fs/nfs/nfs4file.c +++

[PATCH 9/9] NFSD: Implement the CLONE call

2015-10-24 Thread Peng Tao
From: Anna Schumaker I can simply call vfs_file_clone_range() and have the vfs do the right thing for the filesystem being exported. Signed-off-by: Anna Schumaker [hch: change to implement the CLONE op instead of COPY] Signed-off-by: Christoph Hellwig

[PATCH 8/9] nfsd: Pass filehandle to nfs4_preprocess_stateid_op()

2015-10-24 Thread Peng Tao
From: Anna Schumaker This will be needed so COPY can look up the saved_fh in addition to the current_fh. Signed-off-by: Anna Schumaker --- fs/nfsd/nfs4proc.c | 16 +--- fs/nfsd/nfs4state.c | 6 +++--- fs/nfsd/state.h | 5

[PATCH 5/9] btrfs: remove btrfs_ioctl_clone(_range)

2015-10-24 Thread Peng Tao
BTRFS_IOC_CLONE/BTRFS_IOC_CLONE_RANGE is now handled by generic layer and goes through the .copy_file_range method. Signed-off-by: Peng Tao --- fs/btrfs/ioctl.c | 49 - 1 file changed, 49 deletions(-) diff --git