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:
+3
-3
@@ -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,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user