summaryrefslogtreecommitdiff
path: root/THANKS.in
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2017-10-10 23:29:08 -0700
committerPádraig Brady <P@draigBrady.com>2017-10-24 19:38:12 -0700
commitde15a497d1f453b93af73a3ae4b6f3ab86532fde (patch)
tree63f089c0272ef48b148a04621be2fdc7fa7b72e7 /THANKS.in
parent9fa178fccd6e18ebeed5cbec50d65ee6b3438b5a (diff)
downloadcoreutils-de15a497d1f453b93af73a3ae4b6f3ab86532fde.tar.gz
dd: fix nocache regions passed to posix_fadvise()
Previously with oflag=direct the call to invalidate_cache() was not passed to the kernel, as it was less than a page size, and a subsequent call was not made to invalidate the pending space. Similarly with oflag=nocache the pending space at EOF was not invalidated. Even though these amount to only a single page in the page cache it can be significant. For example on XFS before kernel patch v4.9-rc1-4-g0ee7a3f, O_DIRECT files would have been read inefficiently if any pages were cached, even if they were already synced to storage. * src/dd.c (i_nocache_eof, o_nocache_eof): New bools used to control when we want invalidate_cache(,0) to clear to EOF. (cache_round): Use IO_BUFSIZE (currently 132KiB) to minimize calls to the relatively expensive advise function, rather than page_size. This also makes it clear that while the kernel function operates on pages, this size is chosen for performance reasons. (invalidate_cache): Refactor to share more code between input and output paths. Use i_nocache_eof and o_nocache_eof rather than proxying off max_records. Ensure we invalidate full pages when clearing to EOF as the kernel will ignore any non complete pages. Fix the offset used for the output path. (dd_copy): Invalidate the cache of the input after the offset is updated, for consistency and so we don't try to invalidate before the start of the file. When we read EOF on input, set flags so that we invalidate to EOF. (main): Invalidate to EOF in more cases, by depending on the i_nocache_eof and o_nocache_eof flags. * doc/coreutils.texi (dd invocation): Clarify the alignment and persisted caveats on the example applying "nocache" to part of a file. * tests/dd/nocache_eof.sh: A new test. * tests/local.mk: Reference the new test. * NEWS: Mention the bug fix. Issue reported by Eric Bergen.
Diffstat (limited to 'THANKS.in')
-rw-r--r--THANKS.in1
1 files changed, 1 insertions, 0 deletions
diff --git a/THANKS.in b/THANKS.in
index b5e11f0a4..46d78ace2 100644
--- a/THANKS.in
+++ b/THANKS.in
@@ -192,6 +192,7 @@ Eli Zaretskii eliz@is.elta.co.il
Emile LeBlanc leblanc@math.toronto.edu
Emmanuel Lacour elacour@home-dn.net
Eric Backus ericb@lsid.hp.com
+Eric Bergen eric.bergen@gmail.com
Eric G. Miller egm2@jps.net
Eric Pemente pemente@northpark.edu
Eric S. Raymond esr@snark.thyrsus.com