X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Freadahead-replay.c;h=ab0c8084c8414c73daded01ca8664565d3937f8a;hp=e22fc04392a8ad7d3d9e8d057b04d3d415bcc050;hb=f1a1cd6497a970a8744b6d71cf5355fa9f75669c;hpb=d9c7a87b35289e9a5ba94c097e861640d1357e6d diff --git a/src/readahead-replay.c b/src/readahead-replay.c index e22fc0439..ab0c8084c 100644 --- a/src/readahead-replay.c +++ b/src/readahead-replay.c @@ -127,6 +127,7 @@ static int replay(const char *root) { assert(root); write_one_line_file("/proc/self/oom_score_adj", "1000"); + bump_request_nr(root); if (asprintf(&pack_fn, "%s/.readahead", root) < 0) { log_error("Out of memory"); @@ -145,6 +146,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;