--- src/create.c	(original)
+++ src/create.c	(modified)
@@ -1049,16 +1049,22 @@
 static enum dump_status
 dump_regular_file (int fd, struct tar_stat_info *st)
 {
+  off_t size_done = 0;
   off_t size_left = st->stat.st_size;
   off_t block_ordinal;
   union block *blk;
 
+  /* Tell the system that we are only going to read the file once.
+     On Linux, this currently has no effect, but it might be supported in the
+     future. */
+  posix_fadvise(fd, 0, 0, POSIX_FADV_NOREUSE);
+
   block_ordinal = current_block_ordinal ();
   blk = start_header (st);
   if (!blk)
     return dump_status_fail;
 
   /* Mark contiguous files, if we support them.  */
   if (archive_format != V7_FORMAT && S_ISCTG (st->stat.st_mode))
     blk->header.typeflag = CONTTYPE;
 
@@ -1093,6 +1099,12 @@
       size_left -= count;
       set_next_block_after (blk + (bufsize - 1) / BLOCKSIZE);
 
+      size_done += count;
+      /* Tell the system that we are not going to need the data that we just
+         read again. This is a workaround for systems that ignore
+         POSIX_FADV_NOREUSE. */
+      posix_fadvise(fd, 0, size_done, POSIX_FADV_DONTNEED);
+
       if (count != bufsize)
 	{
 	  char buf[UINTMAX_STRSIZE_BOUND];
