[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(-)
- cpio copy-out reflink and chain support,
David Disseldorp <=
- [PATCH 1/8] open device with O_NONBLOCK option, David Disseldorp, 2021/03/11
- [PATCH 5/8] add --reflink option, David Disseldorp, 2021/03/11
- [PATCH 7/8] ensure uniform post-trailer-zeros length, David Disseldorp, 2021/03/11
- [PATCH 3/8] add --chain test coverage, David Disseldorp, 2021/03/11
- [PATCH 6/8] attempt copy_file_range if explicitly requested, David Disseldorp, 2021/03/11
- [PATCH 4/8] add copy_file_range syscall support, David Disseldorp, 2021/03/11