Package: pv
Version: 1.6.0-1
Severity: wishlist

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

pv's --skip-errors behavior is currently to try skipping 1 byte a few
times, then 2 bytes a few times, then 1 byte a few more (because it was
at 14 bytes), then 4 a few, then... blah blah, until it finally finishes
by skipping 512 bytes 7 times; all in all, I counted 25 attempts,
totaling of course 4k.

Because it's a disk, with 4k sectors. Bad blocks on the disk,
fundamentally, can not be smaller than 4k. (Nor larger, really, but of
course you can have two in a row.)

This wouldn't be a huge deal, except that disks take forever attempting
to read bad sectors. 30 seconds per failed read is quite possible (some
take longer, actually, and Linux times out, then you get to wait through
a reset cycle, though strictly speaking that's admin error in failing to
raise the Linux timeout)

I'm not sure if there is *any* storage device which can have a 1-byte
error. Wikipedia tells me there were once floppy formats with 128-byte
sectors. It was apparently common enough with 8-inch and even 5ΒΌ-inch
floppies. (Did floppies have error-detecting codes? No idea).

Also, I think without O_DIRECT, you can't actually get a bad block
smaller than Linux's page size of 4k.

So really it seems like -E ought to just skip 4k at once.

Or at least there ought to be an option to specify the skip size. I'd
suggest -E should take an optional argument, the skip size, and default
to 4k.

- -- System Information:
Debian Release: stretch/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'testing'), (500, 'stable'), (130, 
'unstable'), (120, 'experimental'), (1, 'experimental-debug')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.6.0-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: systemd (via /run/systemd/system)

Versions of packages pv depends on:
ii  libc6  2.24-3

pv recommends no packages.

Versions of packages pv suggests:
ii  doc-base  0.10.7

- -- no debconf information

-----BEGIN PGP SIGNATURE-----

iFwEARECABwFAlf0UwcVHGFudGhvbnlAZGVyb2JlcnQubmV0AAoJEPs/iMJV6ln+
uVUAniIVKf8qQWiweAEMRlrXA15iTG5kAJkBhpKsCm0E9hKyNrObR5F/DtQpWg==
=EH8x
-----END PGP SIGNATURE-----

Reply via email to