bug-cpio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

cpio copy-out reflink and chain support


From: David Disseldorp
Subject: cpio copy-out reflink and chain support
Date: Fri, 12 Mar 2021 02:30:11 +0100

This patchset adds support for Linux copy_file_range() syscall usage via
a new '--reflink' copy-out parameter. The syscall can considerably
improve archive creation performance and space efficiency on
copy-on-write filesystems such as XFS and Btrfs by performing a metadata
only reflink instead of regular read/write copy I/O. The patchset is
built on Luis' previous submission at:
https://lists.gnu.org/archive/html/bug-cpio/2020-07/msg00001.html

An additional '--chain' parameter is also added for appending a new
archive to an existing file. This is useful for Linux initramfs images,
which can be chained back-to-back.
Unit test coverage for both new parameters is provided.

Dracut changes to make use of the above features when building a Linux
initramfs image have been submitted upstream via:
https://github.com/dracutdevs/dracut/pull/1148 .

This patch set also carries the queued change at
https://savannah.gnu.org/patch/?9263 .

Feedback appreciated.

Cheers, David

--

 configure.ac       |  6 +++
 src/copyin.c       |  2 +-
 src/copyout.c      | 43 +++++++++++++++++---
 src/extern.h       |  7 +++-
 src/global.c       |  7 +++-
 src/main.c         | 50 +++++++++++++++++++++--
 src/mt.c           |  4 +-
 src/util.c         | 65 ++++++++++++++++++++++++++++--
 tests/chain.at     | 91 ++++++++++++++++++++++++++++++++++++++++++
 tests/reflink.at   | 98 ++++++++++++++++++++++++++++++++++++++++++++++
 tests/testsuite.at |  2 +
 11 files changed, 356 insertions(+), 19 deletions(-)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]