Bug 135461 - copy_file_range: Please clarify if overlapping ranges in the same file are supported
Summary: copy_file_range: Please clarify if overlapping ranges in the same file are su...
Status: NEW
Alias: None
Product: File System
Classification: Unclassified
Component: VFS (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: fs_vfs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-17 16:30 UTC by Christoph Reiter
Modified: 2016-07-18 21:30 UTC (History)
0 users

See Also:
Kernel Version: Linux debian 4.6.0-1-amd64 #1 SMP Debian 4.6.3-1 (2016-07-04) x86_64 GNU/Linux
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Christoph Reiter 2016-07-17 16:30:23 UTC
I'd like to know if overlapping areas are supported with copy_file_range. From my testing it works with xfs and ext4, but I'd like to have confirmation that this wont break in the future or with other file systems.

Having this in the man page would help a lot.

My use case for copying overlapping areas in the same file is prepending data to a file. I was hoping that copy_file_range would make this faster compared to mmap/memmove in case the file is on a NFS mount.

Thanks
Comment 1 Christoph Reiter 2016-07-18 21:30:20 UTC
OK, after some testing I see that it does not work and not everything gets copied.

Adding this limitation to the man page would help.

Note You need to log in before you can comment on or make changes to this bug.