Skip to content

cross-fs copy_file_range() fixes for stable

Amir Goldstein linux-fsdevel stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2vfs: fix copy_file_range() regression in cross-fs copiesfs/nfsd/vfs.c fs/read_write.c+51 -340 replies
2/2vfs: fix copy_file_range() averts filesystem freeze protectionfs/nfsd/vfs.c fs/read_write.c include/linux/fs.h+23 -60 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by.

PatchNamjae JeonLuis Henriques
1/2T-b T-b
2/2T-b T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 5.10 0/2] cross-fs copy_file_range() fixes for stable

Greg,

The recent history of copy_file_range() API is somewhat convoluted. The API changes are documented in copy_file_range(2) man page. I've just posted a man page update patch [1] to fix some wrong kernel version references in the man page.

The problem is that it took many kernel releases to get reports on the regression from v5.3 and yet more releases (v5.12..v5.19) to work on the solution and get it merged.

This situation leads to confusion among users as can be seen in [2]. You've already picked the patch [1/2] to 5.15.y and I sent you a request to pick patch [2/2] (from v6.1) as well.

Following are backports of the two patches to 5.10.y, which I verified with the relevant test in fstests.

Backport to 5.4.y is more challenging because Darrick did a lot of cleanup in that area between v5.4..v5.10, so I did not do it.

Thanks,
Amir.

[1] https://lore.kernel.org/linux-fsdevel/[email protected]/
[2] https://bugzilla.kernel.org/show_bug.cgi?id=216800

Amir Goldstein (2):
vfs: fix copy_file_range() regression in cross-fs copies
vfs: fix copy_file_range() averts filesystem freeze protection

 fs/nfsd/vfs.c      |  8 ++++-
 fs/read_write.c    | 90 +++++++++++++++++++++++++++++++++---------------------
 include/linux/fs.h |  8 +++++
 3 files changed, 70 insertions(+), 36 deletions(-)
Signature · 1 line
2.16.5