core: rename/generalize UNIT(u)->test_start_limit() hook

Up until now the main reason why we didn't proceed with starting the
unit was exceed start limit burst. However, for unit types like mounts
the other reason could be effective ratelimit on /proc/self/mountinfo
event source. That means our mount unit state may not reflect current
kernel state. Hence, we need to attempt to re-run the start job again
after ratelimit on event source expires.

As we will be introducing another reason than start limit let's rename
the virtual function that implements the check.
This commit is contained in:
Michal Sekletar
2021-11-11 17:04:36 +01:00
parent fd69f22475
commit 705578c3b9
9 changed files with 25 additions and 25 deletions
+3 -3
View File
@@ -889,7 +889,7 @@ static int timer_can_clean(Unit *u, ExecCleanMask *ret) {
return 0;
}
static int timer_test_start_limit(Unit *u) {
static int timer_can_start(Unit *u) {
Timer *t = TIMER(u);
int r;
@@ -901,7 +901,7 @@ static int timer_test_start_limit(Unit *u) {
return r;
}
return 0;
return 1;
}
static const char* const timer_base_table[_TIMER_BASE_MAX] = {
@@ -965,5 +965,5 @@ const UnitVTable timer_vtable = {
.bus_set_property = bus_timer_set_property,
.test_start_limit = timer_test_start_limit,
.can_start = timer_can_start,
};