Re: [PATCH v3 0/8] gen_init_cpio: add copy_file_range / reflink support

Nathan Chancellor
2025-08-21T19:09:58Z

On Tue, 19 Aug 2025 13:05:43 +1000, David Disseldorp wrote:
> This patchset adds copy_file_range() support to gen_init_cpio. When
> combined with data segment alignment, large-file archiving performance
> is improved on Btrfs and XFS due to reflinks (see patch 7 benchmarks).
>
> cpio data segment alignment is provided by "bending" the newc spec
> to zero-pad the filename field. GNU cpio and Linux initramfs
> extractors handle this fine as long as PATH_MAX isn't exceeded. A
> kernel initramfs extraction unit test for this is provided.
>
> [...]

Applied, thanks!

[1/8] gen_init_cpio: write to fd instead of stdout stream
https://git.kernel.org/kbuild/c/1400227773201
[2/8] gen_init_cpio: support -o <output_file> parameter
https://git.kernel.org/kbuild/c/ae18b94099b04
[3/8] gen_init_cpio: attempt copy_file_range for file data
https://git.kernel.org/kbuild/c/97169cd6d95b3
[4/8] gen_init_cpio: avoid duplicate strlen calls
https://git.kernel.org/kbuild/c/348ff9e3c1cf1
[5/8] gen_initramfs.sh: use gen_init_cpio -o parameter
https://git.kernel.org/kbuild/c/9135564db4904
[6/8] docs: initramfs: file data alignment via name padding
https://git.kernel.org/kbuild/c/7c1f14f6e8e7f
[7/8] gen_init_cpio: add -a <data_align> as reflink optimization
https://git.kernel.org/kbuild/c/5467e85508fd1
[8/8] initramfs_test: add filename padding test case
https://git.kernel.org/kbuild/c/6da752f55bc48

Best regards,
--
Nathan Chancellor <nathan@kernel.org>