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 e22fc04..cb93fae 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;