mount: clarify that umount retries do not (anymore) allow multiple timeouts

It _looks_ as if, back when we used to retry unsuccessful calls to umount,
this would have inflated the effective timeout.  Multiplying it by
RETRY_UMOUNT_MAX.  Which is set to 32.

I'm surprised if it's true: I would have expected it to be noticed during
the work on NFS timeouts.  But I can't see what would have stopped it.

Clarify that I do not expect this to happen anymore.  I think each
individual umount call is allowed up to the full timeout, but if umount
ever exited with a signal status, we would stop retrying.

To be extra clear, make sure that we do not retry in the event that umount
perversely returned EXIT_SUCCESS after receiving SIGTERM.
This commit is contained in:
Alan Jenkins
2018-01-23 11:09:18 +00:00
parent 006aabbd05
commit 5701836121
+7 -3
View File
@@ -1308,13 +1308,12 @@ static void mount_sigchld_event(Unit *u, pid_t pid, int code, int status) {
break;
case MOUNT_UNMOUNTING:
case MOUNT_UNMOUNTING_SIGKILL:
case MOUNT_UNMOUNTING_SIGTERM:
if (f == MOUNT_SUCCESS && m->from_proc_self_mountinfo) {
/* Still a mount point? If so, let's try again. Most likely there were multiple mount points
* stacked on top of each other. */
* stacked on top of each other. We might exceed the timeout specified by the user overall,
* but we will stop as soon as any one umount times out. */
if (m->n_retry_umount < RETRY_UMOUNT_MAX) {
log_unit_debug(u, "Mount still present, trying again.");
@@ -1329,6 +1328,11 @@ static void mount_sigchld_event(Unit *u, pid_t pid, int code, int status) {
break;
case MOUNT_UNMOUNTING_SIGKILL:
case MOUNT_UNMOUNTING_SIGTERM:
mount_enter_dead_or_mounted(m, f);
break;
default:
assert_not_reached("Uh, control process died at wrong time.");
}