On Thu, Feb 12, 2015 at 05:28:47PM +0000, Margaret Lewicka wrote:
---
builder/pxzcat-c.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/builder/pxzcat-c.c b/builder/pxzcat-c.c
index 0bbd296..dec9cc2 100644
--- a/builder/pxzcat-c.c
+++ b/builder/pxzcat-c.c
@@ -214,8 +214,10 @@ pxzcat (value filenamev, value outputfilev, unsigned nr_threads)
unix_error (err, (char *) "ftruncate", outputfilev);
}
+#if defined HAVE_POSIX_FADVISE
/* Tell the kernel we won't read the output file. */
ignore_value (posix_fadvise (fd, 0, 0, POSIX_FADV_RANDOM|POSIX_FADV_DONTNEED));
+#endif
/* Iterate over blocks. */
iter_blocks (idx, nr_threads, filenamev, fd, outputfilev, ofd);
--
1.9.3
Pushed.
Thanks,
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/