From 041717c4853431d7437833e78e46246f849beb91 Mon Sep 17 00:00:00 2001 From: shaver Date: Tue, 18 Nov 2003 18:30:56 +0000 Subject: [PATCH] b=2247: detect misbehaving clients that reuse UUIDs _and_ import handles (such as libtest before the srand fix) and error, rather than LBUGing. --- lustre/ldlm/ldlm_lib.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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 */ -- 1.8.3.1