linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/7] gen_init_cpio: add copy_file_range / reflink support
@ 2025-08-14  5:17 David Disseldorp
  2025-08-14  5:17 ` [PATCH v2 1/7] gen_init_cpio: write to fd instead of stdout stream David Disseldorp
                   ` (7 more replies)
  0 siblings, 8 replies; 17+ messages in thread
From: David Disseldorp @ 2025-08-14  5:17 UTC (permalink / raw)
  To: linux-kbuild, linux-fsdevel; +Cc: linux-next

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 7/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.

Changes since v1 RFC
- add alignment patches 6-7
- slightly rework commit and error messages
- rename l->len to avoid 1/i confusion

David Disseldorp (7):
      gen_init_cpio: write to fd instead of stdout stream
      gen_init_cpio: support -o <output_path> parameter
      gen_init_cpio: attempt copy_file_range for file data
      gen_init_cpio: avoid duplicate strlen calls
      gen_initramfs.sh: use gen_init_cpio -o parameter
      docs: initramfs: file data alignment via name padding
      gen_init_cpio: add -a <data_align> as reflink optimization

 .../driver-api/early-userspace/buffer-format.rst   |   5 +
 usr/gen_init_cpio.c                                | 234 ++++++++++++++-------
 usr/gen_initramfs.sh                               |   7 +-
 3 files changed, 166 insertions(+), 80 deletions(-)


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2025-08-21  8:11 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-14  5:17 [PATCH v2 0/7] gen_init_cpio: add copy_file_range / reflink support David Disseldorp
2025-08-14  5:17 ` [PATCH v2 1/7] gen_init_cpio: write to fd instead of stdout stream David Disseldorp
2025-08-18 18:40   ` Nicolas Schier
2025-08-14  5:18 ` [PATCH v2 2/7] gen_init_cpio: support -o <output_path> parameter David Disseldorp
2025-08-18 18:40   ` Nicolas Schier
2025-08-14  5:18 ` [PATCH v2 3/7] gen_init_cpio: attempt copy_file_range for file data David Disseldorp
2025-08-18 18:40   ` Nicolas Schier
2025-08-19  0:20     ` David Disseldorp
2025-08-14  5:18 ` [PATCH v2 4/7] gen_init_cpio: avoid duplicate strlen calls David Disseldorp
2025-08-14  5:18 ` [PATCH v2 5/7] gen_initramfs.sh: use gen_init_cpio -o parameter David Disseldorp
2025-08-18 18:40   ` Nicolas Schier
2025-08-14  5:18 ` [PATCH v2 6/7] docs: initramfs: file data alignment via name padding David Disseldorp
2025-08-14  5:18 ` [PATCH v2 7/7] gen_init_cpio: add -a <data_align> as reflink optimization David Disseldorp
2025-08-18 19:23   ` Nicolas Schier
2025-08-21  8:10     ` David Disseldorp
2025-08-18 18:40 ` [PATCH v2 0/7] gen_init_cpio: add copy_file_range / reflink support Nicolas Schier
2025-08-18 23:46   ` David Disseldorp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).