gen_init_cpio: add copy_file_range / reflink support
Status from this message: Applied, thanks!
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest8 patches 5 repliesApplied
- v27 patches 9 repliesSuperseded
- v1 RFC5 patches 0 repliesSuperseded
Changes in v3 from the cover letter
- 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
Patches in v3 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | gen_init_cpio: write to fd instead of stdout streamusr/ | +81 | 0 replies | |
| 2/8 | gen_init_cpio: support -o <output_file> parameterusr/ | +16 | 0 replies | |
| 3/8 | gen_init_cpio: attempt copy_file_range for file datausr/ | +12 | 0 replies | |
| 4/8 | gen_init_cpio: avoid duplicate strlen callsusr/ | +24 | 0 replies | |
| 5/8 | gen_initramfs.sh: use gen_init_cpio -o parameterusr/ | +4 | 0 replies | |
| 6/8 | docs: initramfs: file data alignment via name paddingDocumentation/ | +5 | 0 replies | |
| 7/8 | gen_init_cpio: add -a <data_align> as reflink optimizationusr/ | +38 | 0 replies | |
| 8/8 | initramfs_test: add filename padding test caseinit/ | +67 | 4 replies |
Reviews trailers per patch
All 8 patches have a Reviewed-by or Acked-by.
| Patch | Nicolas Schier |
|---|---|
| 1/8 | R-b |
| 2/8 | R-b |
| 3/8 | R-b |
| 4/8 | R-b |
| 5/8 | R-b |
| 6/8 | R-b |
| 7/8 | R-b |
| 8/8 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v3 0/8] gen_init_cpio: add copy_file_range / reflink support
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