]> git.ipfire.org Git - thirdparty/systemd.git/commit
Allow TimeoutSec=0 to work as documented in mount units and elsewhere (#6013)
authorNeilBrown <neil@brown.name>
Tue, 23 May 2017 07:42:26 +0000 (17:42 +1000)
committerLennart Poettering <lennart@poettering.net>
Tue, 23 May 2017 07:42:26 +0000 (09:42 +0200)
commit2d79a0bbb9f651656384a0a86ed814e6306fb5dd
treea0d07c8ef3a4f6482669c9f6789f8c2e62c32f32
parente8a94ce83ebc5e5fa0dd312d8340d589506528f9
Allow TimeoutSec=0 to work as documented in mount units and elsewhere (#6013)

Since commit 36c16a7cdd6c ("core: rework unit timeout handling, and add
new setting RuntimeMaxSec=") TimeoutSec=0 in mount units has
cause the mount to timeout immediately instead of never as documented.

There is a similar problem with Socket.TimeoutSec and Swap.TimeoutSec.

These are easily fixed using config_parse_sec_fix_0().

Automount.TimeoutIdleSec looks like it could have the same problem,
but doesn't because the kernel treats '0' as 'no timeout'.
It handle USEC_INFINITY correctly only because that constant has
the value '-1', and when round up, it becomes zero.
To avoid possible confusion, use config_parse_sec_fix_0() as well, and
explicitly handle USEC_INFINITY.
src/core/automount.c
src/core/load-fragment-gperf.gperf.m4