From d5d3b12986cec4ccd36ab6506a3b2e2ffd599713 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Mon, 12 Jul 2021 13:21:14 -0700 Subject: [PATCH] Specficially shutdown quorum during forced unmount Generally, forced unmount works by returning errors for all IO. Quorum is pretty resilient in that it can have the IO errors eaten by server startup and does its own messaging that won't return errors. Trying to force unmount can have the quorum service continually participate in electing a server that immediately fails and shutds down. This specifically shuts down the internal quorum service when it sees that unmount is being forced. This is easier and cleaner than having the network IO return errors and then having that trigger shutdown. Signed-off-by: Zach Brown --- kmod/src/quorum.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kmod/src/quorum.c b/kmod/src/quorum.c index 6cff0a9d..ba259f40 100644 --- a/kmod/src/quorum.c +++ b/kmod/src/quorum.c @@ -608,7 +608,7 @@ static void scoutfs_quorum_worker(struct work_struct *work) if (ret < 0) goto out; - while (!qinf->shutdown) { + while (!(qinf->shutdown || scoutfs_forcing_unmount(sb))) { ret = recv_msg(sb, &msg, qst.timeout); if (ret < 0) {