summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-09-29 03:11:35 +0200
committerLennart Poettering <lennart@poettering.net>2010-09-29 03:11:35 +0200
commitbdb0e14d278199037e74cef8c078f5dcce6a09fe (patch)
tree83900f7061e4a7fbab8319f65e0836ba9ab85a49
parentcf895f30766d381a8fc07cc48cab1039fbff1c2d (diff)
readahead: preload pack file
-rw-r--r--src/readahead-replay.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/readahead-replay.c b/src/readahead-replay.c
index e22fc04392..cb93fae806 100644
--- a/src/readahead-replay.c
+++ b/src/readahead-replay.c
@@ -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;