From: Zach Brown
Add sys_copy_file_range to the x86 syscall tables.
Signed-off-by: Zach Brown
Signed-off-by: Anna Schumaker
---
arch/x86/entry/syscalls/syscall_32.tbl | 1 +
arch/x86/entry/syscalls/syscall_64.tbl | 1 +
2 files changed, 2 insertions(+)
diff --git a/arch/x86/entry/syscalls
The way to think about this is that the destination filesystem reads the
data from the source file and processes it accordingly. This is
especially important to avoid an infinate loop when doing a "server to
server" copy on NFS.
Signed-off-by: Anna Schumaker
---
fs/read_write.c | 6
: Zach Brown
[Anna Schumaker: Change -EINVAL to -EBADF during file verification]
Signed-off-by: Anna Schumaker
---
fs/read_write.c | 129 ++
include/linux/fs.h| 3 +
include/uapi/asm-generic/unistd.h | 4 +-
kernel/sys_ni.c
shared.
Signed-off-by: Zach Brown
Signed-off-by: Anna Schumaker
---
fs/btrfs/ctree.h | 3 ++
fs/btrfs/file.c | 1 +
fs/btrfs/ioctl.c | 91
3 files changed, 56 insertions(+), 39 deletions(-)
diff --git a/fs/btrfs/ctree.h b/fs/btrfs
copy_file_range() is a new system call for copying ranges of data
completely in the kernel. This gives filesystems an opportunity to
implement some kind of "copy acceleration", such as reflinks or
server-side-copy (in the case of NFS).
Signed-off-by: Anna Schumaker
---
man2/copy_fi
0.33s | 0.49s | 0.76s | 0.99s
cpu | 77% | 62% | 60% |59%
total | 0.422 | 0.777 | 1.267 | 1.655
Questions? Comments? Thoughts?
Anna
Anna Schumaker (5):
btrfs: Add mountpoint checking during btrfs_copy_file_range
vfs: Remove copy_f
e the fallback.
Signed-off-by: Anna Schumaker
---
fs/read_write.c | 16
include/linux/copy.h | 6 ++
include/uapi/linux/Kbuild | 1 +
include/uapi/linux/copy.h | 6 ++
4 files changed, 25 insertions(+), 4 deletions(-)
create mode 100644 include/linux/c
I still want to do an in-kernel copy even if the files are on different
mountpoints, and NFS has a "server to server" copy that expects two
files on different mountpoints. Let's have individual filesystems
implement this check instead.
Signed-off-by: Anna Schumaker
---
fs/r
We need to verify that both the source and the destination files are
part of the same filesystem, otherwise we can't create a reflink.
Signed-off-by: Anna Schumaker
---
fs/btrfs/ioctl.c | 4
1 file changed, 4 insertions(+)
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 62
I don't think it makes sense to report that a copy succeeded if the
files aren't open properly.
Signed-off-by: Anna Schumaker
---
fs/read_write.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/read_write.c b/fs/read_write.c
index 922ca58..59637ed 10064
On 09/04/2015 05:08 PM, Darrick J. Wong wrote:
> On Fri, Sep 04, 2015 at 04:17:02PM -0400, Anna Schumaker wrote:
>> The NFS server will need a fallback for filesystems that don't have any
>> kind of copy acceleration yet, and it should be generally useful to have
>> an in
On 09/04/2015 05:38 PM, Darrick J. Wong wrote:
> On Fri, Sep 04, 2015 at 04:17:03PM -0400, Anna Schumaker wrote:
>> copy_file_range() is a new system call for copying ranges of data
>> completely in the kernel. This gives filesystems an opportunity to
>> implement some kind
On 09/04/2015 06:31 PM, Andreas Dilger wrote:
> On Sep 4, 2015, at 3:38 PM, Darrick J. Wong wrote:
>>
>> On Fri, Sep 04, 2015 at 04:17:03PM -0400, Anna Schumaker wrote:
>>> copy_file_range() is a new system call for copying ranges of data
>>> completely in the k
On 09/04/2015 06:25 PM, Andreas Dilger wrote:
> On Sep 4, 2015, at 2:16 PM, Anna Schumaker wrote:
>>
>> Copy system calls came up during Plumbers a couple of weeks ago,
>> because several filesystems (including NFS and XFS) are currently
>> working on copy accele
On 09/05/2015 04:33 AM, Al Viro wrote:
> On Fri, Sep 04, 2015 at 04:25:27PM -0600, Andreas Dilger wrote:
>
>> This is a bit of a surprising result, since in my testing in the
>> past, copy_{to/from}_user() is a major consumer of CPU time (50%
>> of a CPU core at 1GB/s). What backing filesystem di
On 09/08/2015 11:21 AM, Pádraig Brady wrote:
> On 04/09/15 21:16, Anna Schumaker wrote:
>> Copy system calls came up during Plumbers a couple of weeks ago, because
>> several filesystems (including NFS and XFS) are currently working on copy
>> acceleration implementations.
On 09/08/2015 04:45 PM, Darrick J. Wong wrote:
> On Tue, Sep 08, 2015 at 11:08:03AM -0400, Anna Schumaker wrote:
>> On 09/05/2015 04:33 AM, Al Viro wrote:
>>> On Fri, Sep 04, 2015 at 04:25:27PM -0600, Andreas Dilger wrote:
>>>
>>>> This is a bit of a surpri
On 09/09/2015 05:18 AM, David Sterba wrote:
> On Fri, Sep 04, 2015 at 04:16:58PM -0400, Anna Schumaker wrote:
>> We need to verify that both the source and the destination files are
>> part of the same filesystem, otherwise we can't create a reflink.
>>
>&g
On 09/09/2015 01:17 PM, Darrick J. Wong wrote:
> On Wed, Sep 09, 2015 at 07:38:14AM -0400, Austin S Hemmelgarn wrote:
>> On 2015-09-08 16:39, Darrick J. Wong wrote:
>>> On Tue, Sep 08, 2015 at 11:04:03AM -0400, Anna Schumaker wrote:
>>>> On 09/04/2015 05:38 PM, Darri
8/09/15 20:10, Andy Lutomirski wrote:
>>>>> On Tue, Sep 8, 2015 at 11:23 AM, Anna Schumaker
>>>>> wrote:
>>>>>> On 09/08/2015 11:21 AM, Pádraig Brady wrote:
>>>>>>> I see copy_file_range() is a reflink() on BTRFS?
>>>>>&
On 09/09/2015 02:12 PM, Darrick J. Wong wrote:
> On Wed, Sep 09, 2015 at 01:31:24PM -0400, Anna Schumaker wrote:
>> On 09/09/2015 01:17 PM, Darrick J. Wong wrote:
>>> On Wed, Sep 09, 2015 at 07:38:14AM -0400, Austin S Hemmelgarn wrote:
>>>> On 2015-09-08 16:39, Darri
On 09/09/2015 04:38 PM, Chris Mason wrote:
> On Wed, Sep 09, 2015 at 04:26:58PM -0400, Trond Myklebust wrote:
>> On Wed, Sep 9, 2015 at 4:09 PM, Chris Mason wrote:
>>> On Tue, Sep 08, 2015 at 04:08:43PM -0700, Andy Lutomirski wrote:
On Tue, Sep 8, 2015 at 3:39 PM, Darrick J. Wong
wrote
On 09/09/2015 05:16 PM, Darrick J. Wong wrote:
> On Wed, Sep 09, 2015 at 02:52:08PM -0400, Anna Schumaker wrote:
>> On 09/08/2015 06:39 PM, Darrick J. Wong wrote:
>>> On Tue, Sep 08, 2015 at 02:45:39PM -0700, Andy Lutomirski wrote:
>>>> On Tue, Sep 8, 2015 at 2:29 PM
The way to think about this is that the destination filesystem reads the
data from the source file and processes it accordingly. This is
especially important to avoid an infinate loop when doing a "server to
server" copy on NFS.
Signed-off-by: Anna Schumaker
---
fs/read_write.c | 6
copy_file_range() is a new system call for copying ranges of data
completely in the kernel. This gives filesystems an opportunity to
implement some kind of "copy acceleration", such as reflinks or
server-side-copy (in the case of NFS).
Signed-off-by: Anna Schumaker
---
man2/copy_fi
From: Zach Brown
Add sys_copy_file_range to the x86 syscall tables.
Signed-off-by: Zach Brown
[Anna Schumaker: Update syscall number in syscall_32.tbl]
Signed-off-by: Anna Schumaker
---
arch/x86/entry/syscalls/syscall_32.tbl | 1 +
arch/x86/entry/syscalls/syscall_64.tbl | 1 +
2 files
Reject copies that don't have the COPY_FR_REFLINK flag set.
Signed-off-by: Anna Schumaker
---
fs/btrfs/ioctl.c | 4
1 file changed, 4 insertions(+)
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 4311554..2e14b91 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -44,6
This is perfectly valid for BTRFS and XFS, so let's leave this up to
filesystems to check.
Signed-off-by: Anna Schumaker
---
fs/read_write.c | 4
1 file changed, 4 deletions(-)
diff --git a/fs/read_write.c b/fs/read_write.c
index 38cc251..d32549b 100644
--- a/fs/read_write.c
+++
I don't think it makes sense to report that a copy succeeded if the
files aren't open properly.
Signed-off-by: Anna Schumaker
---
fs/read_write.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/read_write.c b/fs/read_write.c
index 82c4933..38cc251 10064
large range.
Signed-off-by: Anna Schumaker
---
v2:
- Rename COPY_REFLINK -> COPY_FR_REFLINK
- Introduce COPY_FR_COPY flag
- Flags == 0 is really COPY_FR_COPY|COPY_FR_REFLINK
- Drop check for invalid flags
- Move call to do_splice_direct() into a new function
- Move rw_verify_area() checks into
: Zach Brown
[Anna Schumaker: Change -EINVAL to -EBADF during file verification]
Signed-off-by: Anna Schumaker
---
fs/read_write.c | 129 ++
include/linux/fs.h| 3 +
include/uapi/asm-generic/unistd.h | 4 +-
kernel/sys_ni.c
shared.
Signed-off-by: Zach Brown
Signed-off-by: Anna Schumaker
Reviewed-by: Josef Bacik
Reviewed-by: David Sterba
---
fs/btrfs/ctree.h | 3 ++
fs/btrfs/file.c | 1 +
fs/btrfs/ioctl.c | 91
3 files changed, 56 insertions(+), 39
.00s | 0.00s | 0.00s | 0.00s | 0.00s
system | 0.65s | 0.46s | 0.70s | 0.93s | 1.18s | 1.41s | 2.37s
cpu |35% |14% |15% |14% |14% |14% |14%
total | 1.870 | 3.084 | 4.613 | 6.206 | 7.884 | 9.372 | 15.904
Questions? Comments? Thoughts?
I still want to do an in-kernel copy even if the files are on different
mountpoints, and NFS has a "server to server" copy that expects two
files on different mountpoints. Let's have individual filesystems
implement this check instead.
Signed-off-by: Anna Schumaker
---
fs/r
On 09/14/2015 11:32 PM, Darrick J. Wong wrote:
> On Fri, Sep 11, 2015 at 04:30:21PM -0400, Anna Schumaker wrote:
>> The NFS server will need some kind offallback for filesystems that don't
>> have any kind of copy acceleration, and it should be generally useful to
>>
On 09/22/2015 07:44 AM, David Sterba wrote:
> On Fri, Sep 11, 2015 at 04:30:14PM -0400, Anna Schumaker wrote:
>> From: Zach Brown
>> +/*
>> + * copy_file_range() differs from regular file read and write in that it
>> + * specifically allows return partial success
On 09/14/2015 02:32 PM, Darrick J. Wong wrote:
> On Sun, Sep 13, 2015 at 09:50:18AM +0200, Michael Kerrisk (man-pages) wrote:
>> Hi Anna,
>>
>> On 09/11/2015 10:30 PM, Anna Schumaker wrote:
>>> copy_file_range() is a new system call for copying ranges of data
>&
Hi Michael,
On 09/13/2015 03:50 AM, Michael Kerrisk (man-pages) wrote:
> Hi Anna,
>
> On 09/11/2015 10:30 PM, Anna Schumaker wrote:
>> copy_file_range() is a new system call for copying ranges of data
>> completely in the kernel. This gives filesystems an opportunity to
&
: Zach Brown
[Anna Schumaker: Change -EINVAL to -EBADF during file verification]
[Anna Schumaker: Change flags parameter from int to unsigned int]
Signed-off-by: Anna Schumaker
---
v3:
- Change flags parameter to take an unsigned int instead of an int
---
fs/read_write.c | 129
Reject copies that don't have the COPY_FR_REFLINK flag set.
Signed-off-by: Anna Schumaker
Reviewed-by: David Sterba
---
fs/btrfs/ioctl.c | 4
1 file changed, 4 insertions(+)
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 4311554..2e14b91 100644
--- a/fs/btrfs/ioctl.c
+++
shared.
Signed-off-by: Zach Brown
Signed-off-by: Anna Schumaker
Reviewed-by: Josef Bacik
Reviewed-by: David Sterba
---
fs/btrfs/ctree.h | 3 ++
fs/btrfs/file.c | 1 +
fs/btrfs/ioctl.c | 91
3 files changed, 56 insertions(+), 39
The way to think about this is that the destination filesystem reads the
data from the source file and processes it accordingly. This is
especially important to avoid an infinate loop when doing a "server to
server" copy on NFS.
Signed-off-by: Anna Schumaker
---
fs/read_write.c | 6
I don't think it makes sense to report that a copy succeeded if the
files aren't open properly.
Signed-off-by: Anna Schumaker
Reviewed-by: David Sterba
---
fs/read_write.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/read_write.c b/fs/read_write.c
ind
This is perfectly valid for BTRFS and XFS, so let's leave this up to
filesystems to check.
Signed-off-by: Anna Schumaker
Reviewed-by: David Sterba
---
fs/read_write.c | 4
1 file changed, 4 deletions(-)
diff --git a/fs/read_write.c b/fs/read_write.c
index f3d6c48..8e7cb33 100644
---
From: Zach Brown
Add sys_copy_file_range to the x86 syscall tables.
Signed-off-by: Zach Brown
[Anna Schumaker: Update syscall number in syscall_32.tbl]
Signed-off-by: Anna Schumaker
---
arch/x86/entry/syscalls/syscall_32.tbl | 1 +
arch/x86/entry/syscalls/syscall_64.tbl | 1 +
2 files
large range.
Signed-off-by: Anna Schumaker
---
v3:
- Check that both filesystems have the same filesystem type
- Add COPY_FR_DEDUPE flag for Darrick
- Check that at most one flag is set at a time
---
fs/read_write.c | 61 +++
include/linux/c
| 0.00s | 0.00s | 0.00s | 0.00s | 0.00s
system | 0.80s | 0.56s | 0.84s | 1.10s | 1.39s | 1.67s | 2.81s
cpu |41% |18% |19% |17% |17% |17% |17%
total | 1.922 | 2.990 | 4.448 | 6.292 | 7.855 | 9.480 | 15.944
Questions? Comments?
I still want to do an in-kernel copy even if the files are on different
mountpoints, and NFS has a "server to server" copy that expects two
files on different mountpoints. Let's have individual filesystems
implement this check instead.
Signed-off-by: Anna Schumaker
Reviewed-b
copy_file_range() is a new system call for copying ranges of data
completely in the kernel. This gives filesystems an opportunity to
implement some kind of "copy acceleration", such as reflinks or
server-side-copy (in the case of NFS).
Signed-off-by: Anna Schumaker
---
v3:
- Add
On 09/25/2015 08:14 PM, Andy Lutomirski wrote:
> On Fri, Sep 25, 2015 at 1:48 PM, Anna Schumaker
> wrote:
>> The NFS server will need some kind offallback for filesystems that don't
>> have any kind of copy acceleration, and it should be generally useful to
>> have an
On 09/28/2015 02:31 PM, Darrick J. Wong wrote:
> On Fri, Sep 25, 2015 at 04:48:14PM -0400, Anna Schumaker wrote:
>> The NFS server will need some kind offallback for filesystems that don't
>
> "some kind of fallback"
I'll rephrase that :)
>
>> have
On 09/28/2015 02:40 PM, Darrick J. Wong wrote:
> On Fri, Sep 25, 2015 at 04:48:16PM -0400, Anna Schumaker wrote:
>> copy_file_range() is a new system call for copying ranges of data
>> completely in the kernel. This gives filesystems an opportunity to
>> implement some kind
Reject copies that don't have the COPY_FR_REFLINK flag set.
Signed-off-by: Anna Schumaker
Reviewed-by: David Sterba
---
fs/btrfs/ioctl.c | 4
1 file changed, 4 insertions(+)
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 4311554..2e14b91 100644
--- a/fs/btrfs/ioctl.c
+++
From: Zach Brown
Add sys_copy_file_range to the x86 syscall tables.
Signed-off-by: Zach Brown
[Anna Schumaker: Update syscall number in syscall_32.tbl]
Signed-off-by: Anna Schumaker
---
arch/x86/entry/syscalls/syscall_32.tbl | 1 +
arch/x86/entry/syscalls/syscall_64.tbl | 1 +
2 files
The way to think about this is that the destination filesystem reads the
data from the source file and processes it accordingly. This is
especially important to avoid an infinate loop when doing a "server to
server" copy on NFS.
Signed-off-by: Anna Schumaker
---
fs/read_write.c | 6
the rw_verify_area() calls into the fallback code since some
filesystems can handle reflinking a large range.
Signed-off-by: Anna Schumaker
Reviewed-by: Darrick J. Wong
---
v4:
- Reword commit message
- Rename COPY_FR_DEDUPE -> COPY_FR_DEDUP
---
fs/read_write.c |
I still want to do an in-kernel copy even if the files are on different
mountpoints, and NFS has a "server to server" copy that expects two
files on different mountpoints. Let's have individual filesystems
implement this check instead.
Signed-off-by: Anna Schumaker
Reviewed-b
This is perfectly valid for BTRFS and XFS, so let's leave this up to
filesystems to check.
Signed-off-by: Anna Schumaker
Reviewed-by: David Sterba
Reviewed-by: Darrick J. Wong
---
fs/read_write.c | 4
1 file changed, 4 deletions(-)
diff --git a/fs/read_write.c b/fs/read_write.c
copy_file_range() is a new system call for copying ranges of data
completely in the kernel. This gives filesystems an opportunity to
implement some kind of "copy acceleration", such as reflinks or
server-side-copy (in the case of NFS).
Signed-off-by: Anna Schumaker
Reviewed-by: Darri
I don't think it makes sense to report that a copy succeeded if the
files aren't open properly.
Signed-off-by: Anna Schumaker
Reviewed-by: David Sterba
---
fs/read_write.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/read_write.c b/fs/read_write.c
ind
shared.
Signed-off-by: Zach Brown
Signed-off-by: Anna Schumaker
Reviewed-by: Josef Bacik
Reviewed-by: David Sterba
---
fs/btrfs/ctree.h | 3 ++
fs/btrfs/file.c | 1 +
fs/btrfs/ioctl.c | 91
3 files changed, 56 insertions(+), 39
: Zach Brown
[Anna Schumaker: Change -EINVAL to -EBADF during file verification]
[Anna Schumaker: Change flags parameter from int to unsigned int]
Signed-off-by: Anna Schumaker
---
fs/read_write.c | 129 ++
include/linux/fs.h| 3
ons? Comments? Thoughts?
Anna
Anna Schumaker (6):
vfs: Copy should check len after file open mode
vfs: Copy shouldn't forbid ranges inside the same file
vfs: Copy should use file_out rather than file_in
vfs: Remove copy_file_range mountpoint checks
vfs: Add vfs_copy_file_range(
On 09/29/2015 11:20 PM, Zhao Lei wrote:
> Hi, Anna Schumaker
>
>> -Original Message-
>> From: linux-btrfs-ow...@vger.kernel.org
>> [mailto:linux-btrfs-ow...@vger.kernel.org] On Behalf Of Anna Schumaker
>> Sent: Wednesday, September 30, 2015 2:05 AM
>>
This is perfectly valid for BTRFS and XFS, so let's leave this up to
filesystems to check.
Signed-off-by: Anna Schumaker
Reviewed-by: David Sterba
Reviewed-by: Darrick J. Wong
---
fs/read_write.c | 4
1 file changed, 4 deletions(-)
diff --git a/fs/read_write.c b/fs/read_write.c
Reject copies that don't have the COPY_FR_REFLINK flag set.
Signed-off-by: Anna Schumaker
Reviewed-by: David Sterba
---
fs/btrfs/ioctl.c | 4
1 file changed, 4 insertions(+)
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index d3697e8..c1f115d 100644
--- a/fs/btrfs/ioctl.c
+++
I don't think it makes sense to report that a copy succeeded if the
files aren't open properly.
Signed-off-by: Anna Schumaker
Reviewed-by: David Sterba
---
fs/read_write.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/read_write.c b/fs/read_write.c
ind
copy_file_range() is a new system call for copying ranges of data
completely in the kernel. This gives filesystems an opportunity to
implement some kind of "copy acceleration", such as reflinks or
server-side-copy (in the case of NFS).
Signed-off-by: Anna Schumaker
Reviewed-by: Darri
: Zach Brown
[Anna Schumaker: Change -EINVAL to -EBADF during file verification]
[Anna Schumaker: Change flags parameter from int to unsigned int]
[Anna Schumaker: Add function to include/linux/syscalls.h]
Signed-off-by: Anna Schumaker
---
v5:
- Bump syscall number again
- Add to include/linux
the rw_verify_area() calls into the fallback code since some
filesystems can handle reflinking a large range.
Signed-off-by: Anna Schumaker
Reviewed-by: Darrick J. Wong
Reviewed-by: Padraig Brady
---
fs/read_write.c | 61 +++
include/linux
I still want to do an in-kernel copy even if the files are on different
mountpoints, and NFS has a "server to server" copy that expects two
files on different mountpoints. Let's have individual filesystems
implement this check instead.
Signed-off-by: Anna Schumaker
Reviewed-b
shared.
Signed-off-by: Zach Brown
[Anna Schumaker: Make flags an unsigned int]
Signed-off-by: Anna Schumaker
Reviewed-by: Josef Bacik
Reviewed-by: David Sterba
---
v5:
- Make flags variable an unsigned int
---
fs/btrfs/ctree.h | 3 ++
fs/btrfs/file.c | 1 +
fs/btrfs/ioctl.c | 91
The way to think about this is that the destination filesystem reads the
data from the source file and processes it accordingly. This is
especially important to avoid an infinate loop when doing a "server to
server" copy on NFS.
Signed-off-by: Anna Schumaker
---
fs/read_write.c | 6
don't need to keep
writing their own ioctls.
This posting fixes a few issues that popped up after I submitted v4 yesterday.
Changes in v5:
- Bump syscall number (again)
- Add sys_copy_file_range() to include/linux/syscalls.h
- Change flags parameter on btrfs to an unsigned int
Anna Sc
From: Zach Brown
Add sys_copy_file_range to the x86 syscall tables.
Signed-off-by: Zach Brown
[Anna Schumaker: Update syscall number in syscall_32.tbl]
Signed-off-by: Anna Schumaker
---
arch/x86/entry/syscalls/syscall_32.tbl | 1 +
arch/x86/entry/syscalls/syscall_64.tbl | 1 +
2 files
On 10/07/2015 09:40 PM, Neil Brown wrote:
> Anna Schumaker writes:
>
>> @@ -1338,34 +1362,26 @@ ssize_t vfs_copy_file_range(struct file *file_in,
>> loff_t pos_in,
>> struct file *file_out, loff_t pos_out,
>>
On 10/09/2015 07:15 AM, Pádraig Brady wrote:
> On 08/10/15 02:40, Neil Brown wrote:
>> Anna Schumaker writes:
>>
>>> @@ -1338,34 +1362,26 @@ ssize_t vfs_copy_file_range(struct file *file_in,
>>> loff_t pos_in,
>>>
I would have folded this and patch 4 earlier if I had written patch 1, but I
didn't feel comfortable modifying Zach's work too much. I can make that change
if it's not really a problem.
Anna
On 10/11/2015 10:22 AM, Christoph Hellwig wrote:
> Needs to be folded.
>
--
To unsubscribe from this
On 10/11/2015 10:23 AM, Christoph Hellwig wrote:
> On Wed, Sep 30, 2015 at 01:26:51PM -0400, Anna Schumaker wrote:
>> I still want to do an in-kernel copy even if the files are on different
>> mountpoints, and NFS has a "server to server" copy that expects two
>>
On 10/12/2015 07:17 PM, Darrick J. Wong wrote:
> On Sun, Oct 11, 2015 at 07:22:03AM -0700, Christoph Hellwig wrote:
>> On Wed, Sep 30, 2015 at 01:26:52PM -0400, Anna Schumaker wrote:
>>> This allows us to have an in-kernel copy mechanism that avoids frequent
>>> switc
On 10/14/2015 02:25 PM, Christoph Hellwig wrote:
> On Wed, Oct 14, 2015 at 01:37:13PM -0400, Anna Schumaker wrote:
>> I would have folded this and patch 4 earlier if I had written patch 1,
>> but I didn't feel comfortable modifying Zach's work too much. I can
>&g
rw_verify_area() calls into the fallback code since some
filesystems can handle reflinking a large range.
Signed-off-by: Anna Schumaker
Reviewed-by: Darrick J. Wong
Reviewed-by: Padraig Brady
---
v6:
- Don't reflink by default.
- Reword commit message.
---
fs/read_write.c
: Zach Brown
[Anna Schumaker: Change -EINVAL to -EBADF during file verification,
Change flags parameter from int to unsigned int,
Add function to include/linux/syscalls.h,
Check copy len after file open mode,
Don't forbid r
I would like to focus on
the base system call first, and then add that later if it's still desired.
Changes in v6:
- Squash together most patches.
- Drop all flags except COPY_FR_REFLINK.
- Drop patch removing same mountpoint check.
- Change default behavior (flags = 0) to a data copy.
Anna
shared.
Signed-off-by: Zach Brown
[Anna Schumaker: Make flags an unsigned int,
Check for COPY_FR_REFLINK]
Signed-off-by: Anna Schumaker
Reviewed-by: Josef Bacik
Reviewed-by: David Sterba
---
v6:
- Check for COPY_FR_REFLINK
---
fs/btrfs/ctree.h | 3 ++
fs/btrfs/file.c | 1
copy_file_range() is a new system call for copying ranges of data
completely in the kernel. This gives filesystems an opportunity to
implement some kind of "copy acceleration", such as reflinks or
server-side-copy (in the case of NFS).
Signed-off-by: Anna Schumaker
Reviewed-by: Darri
From: Zach Brown
Add sys_copy_file_range to the x86 syscall tables.
Signed-off-by: Zach Brown
[Anna Schumaker: Update syscall number in syscall_32.tbl]
Signed-off-by: Anna Schumaker
---
arch/x86/entry/syscalls/syscall_32.tbl | 1 +
arch/x86/entry/syscalls/syscall_64.tbl | 1 +
2 files
copy_file_range() is a new system call for copying ranges of data
completely in the kernel. This gives filesystems an opportunity to
implement some kind of "copy acceleration", such as reflinks or
server-side-copy (in the case of NFS).
Signed-off-by: Anna Schumaker
Reviewed-by: Darri
h the
pagecache.
I moved the rw_verify_area() calls into the fallback code since some
filesystems can handle reflinking a large range.
Signed-off-by: Anna Schumaker
Reviewed-by: Darrick J. Wong
Reviewed-by: Padraig Brady
---
v7:
- Remove checks for COPY_FR_REFLINK
---
fs/read_write.c
ing on ARM devices.
- Meniton sparse file expansion in the man page.
Anna Schumaker (1):
vfs: Add vfs_copy_file_range() support for pagecache copies
Zach Brown (3):
vfs: add copy_file_range syscall and vfs helper
x86: add sys_copy_file_range to syscall tables
btrfs: add .copy_file_range file
shared.
Signed-off-by: Zach Brown
[Anna Schumaker: Make flags an unsigned int]
Signed-off-by: Anna Schumaker
Reviewed-by: Josef Bacik
Reviewed-by: David Sterba
---
v7:
- Remove COPY_FR_REFLINK check
---
fs/btrfs/ctree.h | 3 ++
fs/btrfs/file.c | 1 +
fs/btrfs/ioctl.c | 91
: Zach Brown
[Anna Schumaker: Change -EINVAL to -EBADF during file verification,
Change flags parameter from int to unsigned int,
Add function to include/linux/syscalls.h,
Check copy len after file open mode,
Don't forbid r
From: Zach Brown
Add sys_copy_file_range to the x86 syscall tables.
Signed-off-by: Zach Brown
[Anna Schumaker: Update syscall number in syscall_32.tbl]
Signed-off-by: Anna Schumaker
---
arch/x86/entry/syscalls/syscall_32.tbl | 1 +
arch/x86/entry/syscalls/syscall_64.tbl | 1 +
2 files
t for now since I use this function for pagecache copies.
Changes in v8:
- Remove redundant checks.
- Make the fdget() / fdput() calls more obvious.
- Document disallowing files open with O_APPEND.
Thanks,
Anna
Anna Schumaker (1):
vfs: Add vfs_copy_file_range() support for pagecache copies
From: Zach Brown
Add sys_copy_file_range to the x86 syscall tables.
Signed-off-by: Zach Brown
[Anna Schumaker: Update syscall number in syscall_32.tbl]
Signed-off-by: Anna Schumaker
Reviewed-by: Christoph Hellwig
---
arch/x86/entry/syscalls/syscall_32.tbl | 1 +
arch/x86/entry/syscalls
copy_file_range() is a new system call for copying ranges of data
completely in the kernel. This gives filesystems an opportunity to
implement some kind of "copy acceleration", such as reflinks or
server-side-copy (in the case of NFS).
Signed-off-by: Anna Schumaker
Reviewed-by: Darri
rw_verify_area() calls into the fallback code since some
filesystems can handle reflinking a large range.
Signed-off-by: Anna Schumaker
Reviewed-by: Darrick J. Wong
Reviewed-by: Padraig Brady
Reviewed-by: Christoph Hellwig
---
fs/read_write.c | 37 ++---
1 file
shared.
Signed-off-by: Zach Brown
[Anna Schumaker: Make flags an unsigned int,
Check for COPY_FR_REFLINK]
Signed-off-by: Anna Schumaker
Reviewed-by: Josef Bacik
Reviewed-by: David Sterba
Reviewed-by: Christoph Hellwig
---
fs/btrfs/ctree.h | 3 ++
fs/btrfs/file.c | 1 +
fs
: Zach Brown
[Anna Schumaker: Change -EINVAL to -EBADF during file verification,
Change flags parameter from int to unsigned int,
Add function to include/linux/syscalls.h,
Check copy len after file open mode,
Don't forbid r
don't need to keep
writing their own ioctls.
Changes in v9:
- Update syscall number for sys_mlock2()
- Fix calls to rw_verify_area()
Thanks,
Anna
Anna Schumaker (1):
vfs: Add vfs_copy_file_range() support for pagecache copies
Zach Brown (3):
vfs: add copy_file_range syscall and vfs he
1 - 100 of 106 matches
Mail list logo