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



Reply via email to