You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(padcpio): new helper binary for cpio data alignment
1. Purpose
Improve cpio archive creation performance and space efficiency by
ensuring that file data is aligned within the archive to the filesystem
block size.
For filesystems supporting reflinks (e.g. XFS and Btrfs) this ensures
that cpio archive data can share the same copy-on-write extents as the
archive source files. A GNU cpio binary capable of copy-on-write cloning
data via copy_file_range is required to make proper use of this.
Padding can't be added to cpio archives arbitrarily, so we need to
inject extra files into the archive to provide filesystem alignment.
2. Behaviour
Read a zero terminated file list from stdin. If an input file, when cpio
serialized, is aligned to <padding alignment order> then print it to
stdout.
If the cpio archived file data would be unaligned then create a padding
file in <pad dir> which, when cpio archived before the input file, will
provide cpio alignment and print the pad file path before the input file
path. GNU cpio reorders hardlinks, so avoid extra complexity by
deferring them (unpadded) to the end of the archive.
Signed-off-by: David Disseldorp <ddiss@suse.de>
0 commit comments