chiark / gitweb /
load-dropin: add support for .requires directories
[elogind.git] / src / readahead-replay.c
index e22fc04392a8ad7d3d9e8d057b04d3d415bcc050..ab0c8084c8414c73daded01ca8664565d3937f8a 100644 (file)
@@ -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;