From: shaver Date: Tue, 18 Nov 2003 18:30:56 +0000 (+0000) Subject: b=2247: detect misbehaving clients that reuse UUIDs _and_ import handles (such X-Git-Tag: v1_7_0_51~2^7~219 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=041717c4853431d7437833e78e46246f849beb91;p=fs%2Flustre-release.git b=2247: detect misbehaving clients that reuse UUIDs _and_ import handles (such as libtest before the srand fix) and error, rather than LBUGing. --- diff --git a/lustre/ldlm/ldlm_lib.c b/lustre/ldlm/ldlm_lib.c index da3b764..c4e7571 100644 --- a/lustre/ldlm/ldlm_lib.c +++ b/lustre/ldlm/ldlm_lib.c @@ -355,12 +355,7 @@ int target_handle_reconnect(struct lustre_handle *conn, struct obd_export *exp, LPX64")\n", cluuid->uuid, exp->exp_connection->c_remote_uuid.uuid, hdl->cookie, conn->cookie); - /* XXX disconnect them here? */ memset(conn, 0, sizeof *conn); - /* This is a little scary, but right now we build this - * file separately into each server module, so I won't - * go _immediately_ to hell. - */ RETURN(-EALREADY); } } @@ -450,8 +445,13 @@ int target_handle_connect(struct ptlrpc_request *req, svc_handler_t handler) export = NULL; } /* If we found an export, we already unlocked. */ - if (!export) + if (!export) { spin_unlock(&target->obd_dev_lock); + } else if (req->rq_reqmsg->conn_cnt == 1) { + CERROR("%s reconnected with 1 conn_cnt; cookies not random?\n", + cluuid.uuid); + GOTO(out, rc = -EALREADY); + } /* Tell the client if we're in recovery. */ /* If this is the first client, start the recovery timer */