summaryrefslogtreecommitdiff
path: root/src/unit.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-07-06 00:47:39 +0200
committerLennart Poettering <lennart@poettering.net>2011-07-06 00:47:42 +0200
commita75560529663e5fd055884e32ab9c73f47f8aaa5 (patch)
tree38a52e5176648f51ed823616c4316ed0e2fa1fe6 /src/unit.c
parent38a285d776cc0bf4440efe79fc7691032bcf3d67 (diff)
manager: merge serialization and desrialization counter into one, and increase it when reexecuting
Instead of having individual counters n_serializing and n_deserializing have a single one n_reloading, which should be sufficient. Set n_reloading when we are about to go down for reexecution to avoid cgroup trimming when we free the units for reexecution.
Diffstat (limited to 'src/unit.c')
-rw-r--r--src/unit.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/unit.c b/src/unit.c
index a2072621b0..d4142098d1 100644
--- a/src/unit.c
+++ b/src/unit.c
@@ -370,7 +370,7 @@ void unit_free(Unit *u) {
u->meta.manager->n_in_gc_queue--;
}
- cgroup_bonding_free_list(u->meta.cgroup_bondings, u->meta.manager->n_serializing <= 0);
+ cgroup_bonding_free_list(u->meta.cgroup_bondings, u->meta.manager->n_reloading <= 0);
free(u->meta.description);
free(u->meta.fragment_path);
@@ -1137,7 +1137,7 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_su
* behaviour here. For example: if a mount point is remounted
* this function will be called too! */
- if (u->meta.manager->n_deserializing <= 0) {
+ if (u->meta.manager->n_reloading <= 0) {
dual_timestamp ts;
dual_timestamp_get(&ts);
@@ -1225,7 +1225,7 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_su
} else
unexpected = true;
- if (u->meta.manager->n_deserializing <= 0) {
+ if (u->meta.manager->n_reloading <= 0) {
/* If this state change happened without being
* requested by a job, then let's retroactively start
@@ -1258,7 +1258,7 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_su
if (u->meta.type == UNIT_SERVICE &&
!UNIT_IS_ACTIVE_OR_RELOADING(os) &&
- u->meta.manager->n_deserializing <= 0) {
+ u->meta.manager->n_reloading <= 0) {
/* Write audit record if we have just finished starting up */
manager_send_unit_audit(u->meta.manager, u, AUDIT_SERVICE_START, true);
u->meta.in_audit = true;
@@ -1275,7 +1275,7 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_su
if (u->meta.type == UNIT_SERVICE &&
UNIT_IS_INACTIVE_OR_FAILED(ns) &&
!UNIT_IS_INACTIVE_OR_FAILED(os) &&
- u->meta.manager->n_deserializing <= 0) {
+ u->meta.manager->n_reloading <= 0) {
/* Hmm, if there was no start record written
* write it now, so that we always have a nice