[systemd-devel] [PATCH] [RFC] umount: reduce verbosity

Alban Crequy alban.crequy at gmail.com
Mon Apr 13 04:13:48 PDT 2015


From: Alban Crequy <alban at endocode.com>

When a systemd-nspawn container terminates, systemd umounts all bind
mounts that were mounted in the container and generates a log for each
umount.

This additional log_info was added by
bce93b7ac7642426039863493694d8c12812e2a7 for debugging shutdown. But
surely log_debug is enough.

I don't want to see them when when systemd is started with --log-target=null.
There are other log_info that I would like to mute on --log-target=null.
Is changing log_info to log_debug the correct approach?

This patch is useful for:
https://github.com/coreos/rkt/issues/690

When rkt is started with --debug, the systemd logs are printed. When rkt
is started without --debug, systemd is started with --log-target=null in
order to mute the logs.
---
 src/core/umount.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/core/umount.c b/src/core/umount.c
index bee267a..b5a466c 100644
--- a/src/core/umount.c
+++ b/src/core/umount.c
@@ -401,7 +401,7 @@ static int mount_points_list_umount(MountPoint **head, bool *changed, bool log_e
                 /* Trying to umount. We don't force here since we rely
                  * on busy NFS and FUSE file systems to return EBUSY
                  * until we closed everything on top of them. */
-                log_info("Unmounting %s.", m->path);
+                log_debug("Unmounting %s.", m->path);
                 if (umount2(m->path, 0) == 0) {
                         if (changed)
                                 *changed = true;
-- 
2.1.4



More information about the systemd-devel mailing list