chiark / gitweb /
relicense to LGPLv2.1 (with exceptions)
[elogind.git] / src / readahead / readahead-replay.c
index 88c7a219a8dd5fa04e4ebd353d4818c2883943ea..7c263f6e5382e4053795278bebc762996ee055e8 100644 (file)
@@ -6,16 +6,16 @@
   Copyright 2010 Lennart Poettering
 
   systemd is free software; you can redistribute it and/or modify it
-  under the terms of the GNU General Public License as published by
-  the Free Software Foundation; either version 2 of the License, or
+  under the terms of the GNU Lesser General Public License as published by
+  the Free Software Foundation; either version 2.1 of the License, or
   (at your option) any later version.
 
   systemd is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-  General Public License for more details.
+  Lesser General Public License for more details.
 
-  You should have received a copy of the GNU General Public License
+  You should have received a copy of the GNU Lesser General Public License
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
@@ -186,7 +186,13 @@ static int replay(const char *root) {
         if (on_ssd)
                 prio = IOPRIO_PRIO_VALUE(IOPRIO_CLASS_IDLE, 0);
         else
-                prio = IOPRIO_PRIO_VALUE(IOPRIO_CLASS_RT, 7);
+                /* We are not using RT here, since we'd starve IO that
+                we didn't record (which is for example blkid, since
+                its disk accesses go directly to the block device and
+                are thus not visible in fallocate) to death. However,
+                we do ask for an IO prio that is slightly higher than
+                the default (which is BE. 4) */
+                prio = IOPRIO_PRIO_VALUE(IOPRIO_CLASS_BE, 2);
 
         if (ioprio_set(IOPRIO_WHO_PROCESS, getpid(), prio) < 0)
                 log_warning("Failed to set IDLE IO priority class: %m");
@@ -338,7 +344,7 @@ int main(int argc, char*argv[]) {
         int r;
         const char *root;
 
-        log_set_target(LOG_TARGET_SYSLOG_OR_KMSG);
+        log_set_target(LOG_TARGET_AUTO);
         log_parse_environment();
         log_open();