emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#71402: closed ([PATCH] services: Never throw when stopping mount-may


From: GNU bug Tracking System
Subject: bug#71402: closed ([PATCH] services: Never throw when stopping mount-may-fail file systems.)
Date: Wed, 26 Jun 2024 22:23:02 +0000

Your message dated Thu, 27 Jun 2024 00:22:14 +0200
with message-id <87frsz9wfd.fsf@gnu.org>
and subject line Re: [bug#71402] [PATCH] services: Never throw when stopping 
mount-may-fail file systems.
has caused the debbugs.gnu.org bug report #71402,
regarding [PATCH] services: Never throw when stopping mount-may-fail file 
systems.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
71402: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=71402
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: [PATCH] services: Never throw when stopping mount-may-fail file systems. Date: Thu, 6 Jun 2024 23:27:48 +0200
This is a followup to 7c27bd115b14afd142da7684cc349369965f9eab.

* gnu/services/base.scm (file-system-shepherd-service): Catch
'system-error from ‘umount’ call when FILE-SYSTEM is marked as
mount-may-fail.

Change-Id: I2234f8da320b43089f4ee058cad8608ce9c078f8
---
 gnu/services/base.scm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Hi!

File systems marked as mount-may-fail could throw when stopped
(when the file system hadn't actually been mount).  This was mostly
harmless, but it should be ignored as well.

Thoughts?

Ludo'.

diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 2d6b0f00e02..c7a14c7ed43 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -448,7 +448,11 @@ (define (file-system-shepherd-service file-system)
                       ;; Make sure PID 1 doesn't keep TARGET busy.
                       (chdir "/")
 
-                      (umount #$target)
+                      #$(if (file-system-mount-may-fail? file-system)
+                            #~(catch 'system-error
+                                (lambda () (umount #$target))
+                                (const #f))
+                            #~(umount #$target))
                       #f))
 
             ;; We need additional modules.

base-commit: 40c6f708393885a2d28f847350e8f47beb11e745
-- 
2.45.1




--- End Message ---
--- Begin Message --- Subject: Re: [bug#71402] [PATCH] services: Never throw when stopping mount-may-fail file systems. Date: Thu, 27 Jun 2024 00:22:14 +0200 User-agent: Gnus/5.13 (Gnus v5.13)
Ludovic Courtès <ludo@gnu.org> skribis:

> This is a followup to 7c27bd115b14afd142da7684cc349369965f9eab.
>
> * gnu/services/base.scm (file-system-shepherd-service): Catch
> 'system-error from ‘umount’ call when FILE-SYSTEM is marked as
> mount-may-fail.
>
> Change-Id: I2234f8da320b43089f4ee058cad8608ce9c078f8

I went ahead and pushed this as
7c8d38f91e7bd4aed106aacc78eb454789538c31.

Ludo’.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]