All of lore.kernel.org
 help / color / mirror / Atom feed
From: hubcap@kernel.org
To: linux-fsdevel@vger.kernel.org
Cc: Mike Marshall <hubcap@omnibond.com>
Subject: [PATCH] orangefs_super: don't wait on service operation on system shutdown.
Date: Tue, 15 Sep 2026 12:26:33 -0400	[thread overview]
Message-ID: <20260915162637.499735-1-hubcap@kernel.org> (raw)

From: Mike Marshall <hubcap@omnibond.com>

If someone reboots the system while an orangefs filesystem is still
mounted, don't wait for the completion of an unmount service operation
that's never going to return.

Signed-off-by: Mike Marshall <hubcap@omnibond.com>
---
 fs/orangefs/super.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/fs/orangefs/super.c b/fs/orangefs/super.c
index 4ec7329b41f6..e6eedb2faef7 100644
--- a/fs/orangefs/super.c
+++ b/fs/orangefs/super.c
@@ -383,6 +383,24 @@ static int orangefs_unmount(int id, __s32 fs_id, const char *devname)
 {
 	struct orangefs_kernel_op_s *op;
 	int r;
+
+	/*
+	 * If someone reboots linux without unmounting orangefs first,
+	 * don't bother firing off an unmount service operation that
+	 * will never complete, or the whole system shutdown
+	 * stalls for ORANGEFS_DEFAULT_OP_TIMEOUT_SECS.
+	 */
+
+	if (!__is_daemon_in_service() ||
+		system_state == SYSTEM_HALT ||
+		system_state == SYSTEM_POWER_OFF ||
+		system_state == SYSTEM_RESTART) {
+			gossip_debug(GOSSIP_SUPER_DEBUG,
+				"%s: dirty unmount.\n",
+				__func__);
+			return 0;
+	}
+
 	op = op_alloc(ORANGEFS_VFS_OP_FS_UMOUNT);
 	if (!op)
 		return -ENOMEM;
-- 
2.55.0


             reply	other threads:[~2026-09-15 16:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-15 16:26 hubcap [this message]
2026-09-25 14:42 ` [PATCH] orangefs_super: don't wait on service operation on system shutdown Christian Brauner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260915162637.499735-1-hubcap@kernel.org \
    --to=hubcap@kernel.org \
    --cc=hubcap@omnibond.com \
    --cc=linux-fsdevel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.