chiark / gitweb /
readahead: preload pack file
authorLennart Poettering <lennart@poettering.net>
Wed, 29 Sep 2010 01:11:35 +0000 (03:11 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 29 Sep 2010 01:11:35 +0000 (03:11 +0200)
src/readahead-replay.c

index e22fc04392a8ad7d3d9e8d057b04d3d415bcc050..cb93fae806e7cbd3fd552b3ab4d10e230ec6e008 100644 (file)
@@ -145,6 +145,8 @@ static int replay(const char *root) {
                 goto finish;
         }
 
+        posix_fadvise(fileno(pack), 0, 0, POSIX_FADV_WILLNEED);
+
         if ((inotify_fd = open_inotify()) < 0) {
                 r = inotify_fd;
                 goto finish;