@@ -304,8 +304,12 @@ struct obd_import {
imp_connect_tried:1,
/* connected but not FULL yet */
imp_connected:1,
- /* grant shrink disabled */
- imp_grant_shrink_disabled:1;
+ /* grant shrink disabled */
+ imp_grant_shrink_disabled:1,
+ /* to suppress LCONSOLE() at
+ * conn.restore
+ */
+ imp_was_idle:1;
u32 imp_connect_op;
u32 imp_idle_timeout;
@@ -1519,21 +1519,22 @@ int ptlrpc_import_recovery_state_machine(struct obd_import *imp)
import_set_state(imp, LUSTRE_IMP_RECOVER);
if (imp->imp_state == LUSTRE_IMP_RECOVER) {
- CDEBUG(D_HA, "reconnected to %s@%s\n",
- obd2cli_tgt(imp->imp_obd),
- imp->imp_connection->c_remote_uuid.uuid);
+ struct ptlrpc_connection *conn = imp->imp_connection;
rc = ptlrpc_resend(imp);
if (rc)
goto out;
ptlrpc_activate_import(imp, true);
- deuuidify(obd2cli_tgt(imp->imp_obd), NULL,
- &target_start, &target_len);
- LCONSOLE_INFO("%s: Connection restored to %.*s (at %s)\n",
- imp->imp_obd->obd_name,
- target_len, target_start,
- obd_import_nid2str(imp));
+ CDEBUG_LIMIT(imp->imp_was_idle ?
+ imp->imp_idle_debug : D_CONSOLE,
+ "%s: Connection restored to %s (at %s)\n",
+ imp->imp_obd->obd_name,
+ obd_uuid2str(&conn->c_remote_uuid),
+ obd_import_nid2str(imp));
+ spin_lock(&imp->imp_lock);
+ imp->imp_was_idle = 0;
+ spin_unlock(&imp->imp_lock);
}
if (imp->imp_state == LUSTRE_IMP_FULL) {
@@ -1749,6 +1750,12 @@ int ptlrpc_disconnect_and_idle_import(struct obd_import *imp)
CDEBUG_LIMIT(imp->imp_idle_debug, "%s: disconnect after %llus idle\n",
imp->imp_obd->obd_name,
ktime_get_real_seconds() - imp->imp_last_reply_time);
+
+ /* don't make noise at reconnection */
+ spin_lock(&imp->imp_lock);
+ imp->imp_was_idle = 1;
+ spin_unlock(&imp->imp_lock);
+
req->rq_interpret_reply = ptlrpc_disconnect_idle_interpret;
ptlrpcd_add_req(req);