diff options
author | Pádraig Brady <P@draigBrady.com> | 2013-11-07 13:26:25 +0000 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2013-11-08 13:33:50 +0000 |
commit | c93d5b4aa7f675dabaebf5e4ee9583162e4c977d (patch) | |
tree | 4d2f9263b40382fb0c133cf5a46392595e3acae5 /man/sync.x | |
parent | bf6bf52dce37832b03ecfbe1b3a3b104f532df42 (diff) | |
download | coreutils-c93d5b4aa7f675dabaebf5e4ee9583162e4c977d.tar.xz |
shred: fix direct I/O failures for last write to file
Since direct I/O is now enabled with commit v8.21-139-gebaf961
we must handle the case where we write an odd size at the
end of a file (with --exact), or we specify an odd --size that
is larger than 64KiB, or in the very unlikely case of a device
with an odd size. This issue was present since direct I/O
support was first added in v5.3.0, but latent since v6.0.
Theoretically this could have also been an issue after that on
systems which didn't have alignment constraints, but did have
size constraints for direct I/O.
* src/shred.c (dopass): On the first pass for a file, always
retry a write that fails with EINVAL, so we handle direct I/O
failure at either the start or end of the file. Adjust the comment
as the original case is out of date and implicitly handled
by this more general fix.
* tests/misc/shred-exact.sh: Add a test case.
* NEWS: Add a "bug fix" entry for shred since there are
two related issues now fixed.
Diffstat (limited to 'man/sync.x')
0 files changed, 0 insertions, 0 deletions