This was inadvertently omitted from
v8.5-104-g47076e3,
and gives the same 5% speedup when copying from an SSD.
* src/copy.c (copy_internal): Apply the FADVISE_SEQUENTIAL hint.
#include "cp-hash.h"
#include "extent-scan.h"
#include "error.h"
+#include "fadvise.h"
#include "fcntl--.h"
#include "fiemap.h"
#include "file-set.h"
size_t buf_alignment_slop = sizeof (word) + buf_alignment - 1;
size_t buf_size = io_blksize (sb);
+ fdadvise (source_desc, 0, 0, FADVISE_SEQUENTIAL);
+
/* Deal with sparse files. */
bool make_holes = false;
bool sparse_src = false;