Re: [PATCH v2 3/7] gen_init_cpio: attempt copy_file_range for file data

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

 



On Thu, Aug 14, 2025 at 03:18:01PM +1000, David Disseldorp wrote:
> The copy_file_range syscall can improve copy performance by cloning
> extents between cpio archive source and destination files.
> Existing read / write based copy logic is retained for fallback in case
> the copy_file_range syscall is unsupported or unavailable due to
> cross-filesystem EXDEV, etc.
> 
> Clone or reflink, as opposed to copy, of source file extents into the
> output cpio archive may (e.g. on Btrfs and XFS) require alignment of the
> output to the filesystem block size. This could be achieved by inserting
> padding entries into the cpio archive manifest.
> 
> Signed-off-by: David Disseldorp <ddiss@xxxxxxx>
> ---
>  usr/gen_init_cpio.c | 14 +++++++++++++-
>  1 file changed, 13 insertions(+), 1 deletion(-)

Thanks.  I like introducing copy_file_range() here, it reduces the cpio
generation time on my system by a about 30% on a btrfs filesystem.
May cpio_mkfile_csum() now the slowest part?

Kind regards,
Nicolas




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux