From: David Disseldorp <ddiss@suse•de>
To: linux-kbuild@vger•kernel.org, linux-fsdevel@vger•kernel.org
Cc: linux-next@vger•kernel.org, ddiss@suse•de, nsc@kernel•org
Subject: [PATCH v3 0/8] gen_init_cpio: add copy_file_range / reflink support
Date: Tue, 19 Aug 2025 13:05:43 +1000 [thread overview]
Message-ID: <20250819032607.28727-1-ddiss@suse.de> (raw)
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.
Changes since v2
- add Nicolas' Reviewed-by tag to patches 1-7
- add patch 8 test for extracting a cpio archive with filename padding
- use trailing '||' for multi-line if conditions instead of prefix
- refer to -o output_file in usage instead of output_path
- define _GNU_SOURCE alongside O_LARGEFILE use, instead of later
Changes since v1 RFC
- add alignment patches 6-7
- slightly rework commit and error messages
- rename l->len to avoid 1/i confusion
next reply other threads:[~2025-08-19 3:50 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-19 3:05 David Disseldorp [this message]
2025-08-19 3:05 ` [PATCH v3 1/8] gen_init_cpio: write to fd instead of stdout stream David Disseldorp
2025-08-19 3:05 ` [PATCH v3 2/8] gen_init_cpio: support -o <output_file> parameter David Disseldorp
2025-08-19 3:05 ` [PATCH v3 3/8] gen_init_cpio: attempt copy_file_range for file data David Disseldorp
2025-08-19 3:05 ` [PATCH v3 4/8] gen_init_cpio: avoid duplicate strlen calls David Disseldorp
2025-08-19 3:05 ` [PATCH v3 5/8] gen_initramfs.sh: use gen_init_cpio -o parameter David Disseldorp
2025-08-19 3:05 ` [PATCH v3 6/8] docs: initramfs: file data alignment via name padding David Disseldorp
2025-08-19 3:05 ` [PATCH v3 7/8] gen_init_cpio: add -a <data_align> as reflink optimization David Disseldorp
2025-08-19 3:05 ` [PATCH v3 8/8] initramfs_test: add filename padding test case David Disseldorp
2025-08-19 20:16 ` kernel test robot
2025-08-20 1:13 ` David Disseldorp
2025-08-20 21:02 ` Nicolas Schier
2025-08-21 5:04 ` David Disseldorp
2025-08-21 5:40 ` Nicolas Schier
2025-08-21 19:09 ` [PATCH v3 0/8] gen_init_cpio: add copy_file_range / reflink support Nathan Chancellor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250819032607.28727-1-ddiss@suse.de \
--to=ddiss@suse$(echo .)de \
--cc=linux-fsdevel@vger$(echo .)kernel.org \
--cc=linux-kbuild@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=nsc@kernel$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox