[systemd-commits] 2 commits - TODO src/dbus-common.c src/dbus-common.h src/dbus-execute.c src/dbus-execute.h src/readahead

Lennart Poettering lennart at kemper.freedesktop.org
Fri Jan 20 17:51:24 PST 2012


 TODO                             |    3 +++
 src/dbus-common.c                |   16 ++++++++++++++++
 src/dbus-common.h                |    1 +
 src/dbus-execute.c               |    2 +-
 src/dbus-execute.h               |    1 +
 src/readahead/readahead-replay.c |    8 +++++++-
 6 files changed, 29 insertions(+), 2 deletions(-)

New commits:
commit 05aa9edde0f9f4077b8120389c93cb0134eda9c5
Author: Lennart Poettering <lennart at poettering.net>
Date:   Sat Jan 21 02:51:13 2012 +0100

    readahead: don't monopolize IO when replaying

diff --git a/TODO b/TODO
index 39d445d..2c7e2b0 100644
--- a/TODO
+++ b/TODO
@@ -20,6 +20,9 @@ Bugfixes:
 * properly handle .mount unit state tracking when two mount points are stacked one on top of another on the exact same mount point.
 
 Features:
+
+* document the exit codes when services fail before they are exec()ed
+
 * use the rtc which has: /sys/class/rtc/*/hctosys == "1" as the system RTC
 
 * rework namespace support, don't use pivot_root, and mount things after creating the namespace, not before
diff --git a/src/readahead/readahead-replay.c b/src/readahead/readahead-replay.c
index 00d57c3..0c739c8 100644
--- a/src/readahead/readahead-replay.c
+++ b/src/readahead/readahead-replay.c
@@ -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");

commit aa001cd699a62a5a7a9b8a86c403bfe35fb73aa4
Author: Lennart Poettering <lennart at poettering.net>
Date:   Sat Jan 21 01:47:53 2012 +0100

    dbus: export ControlGroupPersistent field on the bus again

diff --git a/src/dbus-common.c b/src/dbus-common.c
index 50daedc..a072369 100644
--- a/src/dbus-common.c
+++ b/src/dbus-common.c
@@ -533,6 +533,22 @@ int bus_property_append_bool(DBusMessageIter *i, const char *property, void *dat
         return 0;
 }
 
+int bus_property_append_tristate_false(DBusMessageIter *i, const char *property, void *data) {
+        int *b = data;
+        dbus_bool_t db;
+
+        assert(i);
+        assert(property);
+        assert(b);
+
+        db = *b > 0;
+
+        if (!dbus_message_iter_append_basic(i, DBUS_TYPE_BOOLEAN, &db))
+                return -ENOMEM;
+
+        return 0;
+}
+
 int bus_property_append_uint64(DBusMessageIter *i, const char *property, void *data) {
         assert(i);
         assert(property);
diff --git a/src/dbus-common.h b/src/dbus-common.h
index c3499b9..15811a7 100644
--- a/src/dbus-common.h
+++ b/src/dbus-common.h
@@ -128,6 +128,7 @@ DBusHandlerResult bus_default_message_handler(
 int bus_property_append_string(DBusMessageIter *i, const char *property, void *data);
 int bus_property_append_strv(DBusMessageIter *i, const char *property, void *data);
 int bus_property_append_bool(DBusMessageIter *i, const char *property, void *data);
+int bus_property_append_tristate_false(DBusMessageIter *i, const char *property, void *data);
 int bus_property_append_int32(DBusMessageIter *i, const char *property, void *data);
 int bus_property_append_uint32(DBusMessageIter *i, const char *property, void *data);
 int bus_property_append_uint64(DBusMessageIter *i, const char *property, void *data);
diff --git a/src/dbus-execute.c b/src/dbus-execute.c
index db7cc2f..c5abcf6 100644
--- a/src/dbus-execute.c
+++ b/src/dbus-execute.c
@@ -416,6 +416,6 @@ const BusProperty bus_exec_context_properties[] = {
         { "KillSignal",               bus_property_append_int,               "i", offsetof(ExecContext, kill_signal)                  },
         { "UtmpIdentifier",           bus_property_append_string,            "s", offsetof(ExecContext, utmp_id),                true },
         { "ControlGroupModify",       bus_property_append_bool,              "b", offsetof(ExecContext, control_group_modify)         },
-/* FIXME{ "ControlGroupPersistent",   bus_property_append_bool,              "b", offsetof(ExecContext, control_group_persistent)     },*/
+        { "ControlGroupPersistent",   bus_property_append_tristate_false,    "b", offsetof(ExecContext, control_group_persistent)     },
         { NULL, }
 };
diff --git a/src/dbus-execute.h b/src/dbus-execute.h
index 4626acb..0aea99e 100644
--- a/src/dbus-execute.h
+++ b/src/dbus-execute.h
@@ -94,6 +94,7 @@
         "  <property name=\"KillSignal\" type=\"i\" access=\"read\"/>\n" \
         "  <property name=\"UtmpIdentifier\" type=\"s\" access=\"read\"/>\n" \
         "  <property name=\"ControlGroupModify\" type=\"b\" access=\"read\"/>\n" \
+        "  <property name=\"ControlGroupPersistent\" type=\"b\" access=\"read\"/>\n" \
         "  <property name=\"PrivateNetwork\" type=\"b\" access=\"read\"/>\n"
 
 #define BUS_EXEC_COMMAND_INTERFACE(name)                             \



More information about the systemd-commits mailing list