[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
cpio copy-pass mode ignores block size arguments ?
From: |
Jean-Baptiste Denis |
Subject: |
cpio copy-pass mode ignores block size arguments ? |
Date: |
Wed, 5 Jan 2022 11:58:26 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 |
Hello everybody,
I've just seen this message from 2006:
https://lists.gnu.org/archive/html/bug-cpio/2006-10/msg00002.html
============
Hello,
I'm trying to use a block size larger (much larger) than 512 in copy-pass mode,
and cpio --help says this should be possible:
Operation modifiers valid in any mode:
--block-size=BLOCK-SIZE Set the I/O block size to BLOCK-SIZE * 512 bytes
-B Set the I/O block size to 5120 bytes
After trying to use the option and seeing (with strace) that the read and write
sizes weren't changing accordingly, I looked at the code and found indications
that these options are ignored in copy-pass mode:
in main.c, lines 764-765:
in_buf_size = DISK_IO_BLOCK_SIZE;
out_buf_size = DISK_IO_BLOCK_SIZE;
in util.c, line 221:
num_bytes = (num_bytes < DISK_IO_BLOCK_SIZE) ? num_bytes : DISK_IO_BLOCK_SIZE;
Since DISK_IO_BLOCK_SIZE is a macro defined as 512, I don't see how I could
ever change the block size at runtime. Am I misunderstanding cpio's usage, or
is there a bug in cpio or its usage message?
thanks,
lars
============
It corresponds exactly to my conclusions after a few experiments this morning,
before I swa the message from Lars. I'll ask the same question:
Am I misunderstanding cpio's usage, or is there a bug in cpio or its usage
message ?
Thank you for your help.
Jean-Baptiste
- cpio copy-pass mode ignores block size arguments ?,
Jean-Baptiste Denis <=