Unverified Commit 97169cd6 authored by David Disseldorp's avatar David Disseldorp Committed by Nathan Chancellor
Browse files

gen_init_cpio: attempt copy_file_range for file data



The copy_file_range syscall can improve copy performance by cloning
extents between cpio archive source and destination files.
Existing read / write based copy logic is retained for fallback in case
the copy_file_range syscall is unsupported or unavailable due to
cross-filesystem EXDEV, etc.

Clone or reflink, as opposed to copy, of source file extents into the
output cpio archive may (e.g. on Btrfs and XFS) require alignment of the
output to the filesystem block size. This could be achieved by inserting
padding entries into the cpio archive manifest.

Signed-off-by: default avatarDavid Disseldorp <ddiss@suse.de>
Reviewed-by: default avatarNicolas Schier <nsc@kernel.org>
Link: https://lore.kernel.org/r/20250819032607.28727-4-ddiss@suse.de


Signed-off-by: default avatarNathan Chancellor <nathan@kernel.org>
parent ae18b940
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment