summaryrefslogtreecommitdiff
path: root/src/shred.c
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2013-11-07 11:57:09 +0000
committerPádraig Brady <P@draigBrady.com>2013-11-08 13:39:35 +0000
commitc2eaef2f57153a22b6dc075b1adc9fde1a4eb7bd (patch)
tree746f4aab9dbb815268574b59ea229a7777f69c47 /src/shred.c
parentc93d5b4aa7f675dabaebf5e4ee9583162e4c977d (diff)
downloadcoreutils-c2eaef2f57153a22b6dc075b1adc9fde1a4eb7bd.tar.gz
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.
Diffstat (limited to 'src/shred.c')
-rw-r--r--src/shred.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shred.c b/src/shred.c
index 98dd8726c..6ff8322c9 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)