Skip to content

RFC Proposal for Cross-fs copy_file_range()

Amir Goldstein linux-fsdevel linux-unionfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest5 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5fs: clarify cross-sb copy_file_range() codefs/read_write.c+51 -190 replies
2/5fs: add support for copy file range from another fsfs/read_write.c include/linux/fs.h+16 -40 replies
3/5fs: add support for copy file range to another fsfs/read_write.c+28 -150 replies
4/5ovl: add support for copy file range from another fsfs/overlayfs/file.c fs/overlayfs/ovl_entry.h+28 -10 replies
5/5ovl: add support for copy file range to another fsfs/overlayfs/file.c+16 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC][PATCH 0/5] Proposal for Cross-fs copy_file_range()

Hi all,

Daan De Meyer requested a way to do copy_file_range() from overlayfs to/from another fs, where if that fs is the base fs of overlayfs layer the copy could be an efficient clone.

TBH, he also requested support also for cross-fs clone_file_range(), but I am not happy about providing that.

copy_file_range() already supports cross-sb efficient copy (e.g. with NFS/SMB server-side copy).

The current limitation of staying on the same fstype is mainly an internal technical limitation (choosing the right f_op), which is something that this RFC is trying to address.

The overlayfs implementation itself is pretty trivial.

Thanks,
Amir.

Amir Goldstein (5):
fs: clarify cross-sb copy_file_range() code
fs: add support for copy file range from another fs
fs: add support for copy file range to another fs
ovl: add support for copy file range from another fs
ovl: add support for copy file range to another fs

 fs/overlayfs/file.c      |  35 ++++++++++++
 fs/overlayfs/ovl_entry.h |   7 ++-
 fs/read_write.c          | 119 ++++++++++++++++++++++++++++-----------
 include/linux/fs.h       |   2 +
 4 files changed, 130 insertions(+), 33 deletions(-)
Signature · 1 line
2.54.0