Whamcloud - gitweb
LU-980 mount: improve mount/unmount messages 11/50511/2
authorAndreas Dilger <adilger@whamcloud.com>
Mon, 3 Apr 2023 20:31:26 +0000 (14:31 -0600)
committerOleg Drokin <green@whamcloud.com>
Tue, 18 Apr 2023 03:21:26 +0000 (03:21 +0000)
In some cases, unmount errors are printed in multiple places, or
are expected so printing them on the console log is not necessary.

Conversely, some status messages such as mounting or unmounting the
whole target should not be rate limited.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Id55f6ee3af5ad3cbe44a380314aa4b31f6b4bad3
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50511
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Olaf Faaland <faaland1@llnl.gov>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/obdclass/obd_config.c
lustre/osp/lwp_dev.c
lustre/target/tgt_mount.c

index 795a8de..861c58b 100644 (file)
@@ -880,8 +880,8 @@ int class_cleanup(struct obd_device *obd, struct lustre_cfg *lcfg)
                                obd->obd_force = 1;
                                break;
                        case 'A':
-                               LCONSOLE_WARN("Failing over %s\n",
-                                             obd->obd_name);
+                               LCONSOLE(D_WARNING, "Failing over %s\n",
+                                        obd->obd_name);
                                spin_lock(&obd->obd_dev_lock);
                                obd->obd_fail = 1;
 #ifdef HAVE_SERVER_SUPPORT
index 31ac7d0..bb76ff0 100644 (file)
@@ -177,10 +177,6 @@ static int lwp_disconnect(struct lwp_device *d)
         */
        ptlrpc_pinger_del_import(imp);
        rc = ptlrpc_disconnect_import(imp, 0);
-       if (rc != 0)
-               CWARN("%s: can't disconnect: rc = %d\n",
-                     d->lpd_obd->obd_name, rc);
-
        ptlrpc_invalidate_import(imp);
 
        RETURN(rc);
index 9e99b94..54106c8 100644 (file)
@@ -993,7 +993,8 @@ static int lustre_disconnect_lwp(struct super_block *sb)
                                                        lwp->obd_lu_dev, lcfg);
                OBD_FREE(lcfg, lustre_cfg_len(lcfg->lcfg_bufcount,
                                              lcfg->lcfg_buflens));
-               if (rc != 0 && rc != -ETIMEDOUT) {
+               if (rc != 0 && rc != -ETIMEDOUT && rc != -ENODEV &&
+                   rc != -ENOTCONN && rc != -ESHUTDOWN) {
                        CERROR("%s: fail to disconnect LWP: rc = %d\n",
                               lwp->obd_name, rc);
                        rc1 = rc;
@@ -1621,7 +1622,7 @@ static void server_put_super(struct super_block *sb)
                int     rc;
 
                rc = lustre_disconnect_lwp(sb);
-               if (rc != 0 && rc != -ETIMEDOUT &&
+               if (rc != 0 && rc != -ETIMEDOUT && rc != -ENODEV &&
                    rc != -ENOTCONN && rc != -ESHUTDOWN)
                        CWARN("%s: failed to disconnect lwp: rc= %d\n",
                              tmpname, rc);
@@ -1715,7 +1716,7 @@ static void server_put_super(struct super_block *sb)
                OBD_FREE(extraname, strlen(extraname) + 1);
        }
 
-       LCONSOLE_WARN("server umount %s complete\n", tmpname);
+       LCONSOLE(D_WARNING, "server umount %s complete\n", tmpname);
        OBD_FREE(tmpname, tmpname_sz);
        EXIT;
 }