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
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
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
+++
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
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
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