I should have bumped up the buffer size for the periodic pattern case too. This should fix it up.
thanks, Pádraig. commit 115c8e620dde3349cb8edef6edaba40dd82395d3 Author: Pádraig Brady <[email protected]> Date: Thu Nov 7 11:57:09 2013 +0000 shred: increase I/O block size for periodic pattern case * src/shred.c (dopass): In the periodic pattern case increase the I/O block size from 12KiB to 60KiB (also a multiple of 3 and 4096). * NEWS: Adjust accordingly. diff --git a/NEWS b/NEWS index bb35583..276e8eb 100644 --- a/NEWS +++ b/NEWS @@ -88,7 +88,7 @@ GNU coreutils NEWS -*- outline -*- outputs, rather than the number of inputs. shred once again uses direct I/O where available, and increases write block - size from 12KiB to 64KiB when possible. + sizes from 12KiB to, depending on the pattern being written, 60KiB or 64KiB. [Direct I/O regression introduced in coreutils-6.0] split --line-bytes=SIZE, now only allocates memory as needed rather diff --git a/src/shred.c b/src/shred.c index 9ff7238..8bee090 100644 --- a/src/shred.c +++ b/src/shred.c @@ -380,7 +380,7 @@ dopass (int fd, char const *qname, off_t *sizep, int type, /* Fill pattern buffer. Aligning it to a page so we can do direct I/O. */ size_t page_size = getpagesize (); -#define PERIODIC_OUTPUT_SIZE (12 * 1024) +#define PERIODIC_OUTPUT_SIZE (60 * 1024) #define NONPERIODIC_OUTPUT_SIZE (64 * 1024) verify (PERIODIC_OUTPUT_SIZE % 3 == 0); size_t output_size = periodic_pattern (type)
