diff options
author | Pádraig Brady <P@draigBrady.com> | 2013-11-04 23:14:10 +0000 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2013-11-05 13:43:20 +0000 |
commit | ebaf961f3ad9ae7e8f9258e46eadb0e0d5e30ade (patch) | |
tree | ffed71280816be28aee3374834eedbfa9ad7c25f /NEWS | |
parent | d60e04424d12764e8f441db111f7466326cdc8e8 (diff) | |
download | coreutils-ebaf961f3ad9ae7e8f9258e46eadb0e0d5e30ade.tar.xz |
shred: enable direct I/O when possible
Commit v5.92-1057-g43d487b introduced a regression
in coreutils 6.0 where it removed the page alignment
of the buffer to write, thus disabling direct I/O.
We want to use direct I/O when possible to avoid
impacting the page cache at least, as we know we don't
want to cache the data we're writing.
* src/shred.c (dopass): Allocate the buffer on the heap,
while using a more general calculation to allow to have
the output size independent from the fillpattern() size
constraint of a multiple of 3. Also we dispense with the
union as it's no longer needed given we're aligning on
a page boundary and thus don't need to explicitly handle
uint32_t alignment.
Diffstat (limited to 'NEWS')
-rw-r--r-- | NEWS | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -87,6 +87,9 @@ GNU coreutils NEWS -*- outline -*- Reservoir sampling is used to limit memory usage based on the number of outputs, rather than the number of inputs. + shred once again uses direct I/O where available. + [Regression introduced in coreutils-6.0] + split --line-bytes=SIZE, now only allocates memory as needed rather than allocating SIZE bytes at program start. |