From: jacob Date: Tue, 15 Feb 2005 21:25:04 +0000 (+0000) Subject: Add some comments so other people don't get fooled into thinking there was a bug... X-Git-Tag: v1_8_0_110~486^5~21 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=b69315e4e107503f6588b81da6a8650883af2f43;p=fs%2Flustre-release.git Add some comments so other people don't get fooled into thinking there was a bug here as i did. --- diff --git a/lustre/ldlm/ldlm_lib.c b/lustre/ldlm/ldlm_lib.c index 1e417e3..17665b7 100644 --- a/lustre/ldlm/ldlm_lib.c +++ b/lustre/ldlm/ldlm_lib.c @@ -356,6 +356,8 @@ int target_handle_reconnect(struct lustre_handle *conn, struct obd_export *exp, if (!memcmp(&conn->cookie, &hdl->cookie, sizeof conn->cookie)) { CERROR("%s reconnecting\n", cluuid->uuid); conn->cookie = exp->exp_handle.h_cookie; + /* target_handle_connect() treats EALREADY and + * -EALREADY differently */ RETURN(EALREADY); } else { CERROR("%s reconnecting from %s, " @@ -364,6 +366,8 @@ int target_handle_reconnect(struct lustre_handle *conn, struct obd_export *exp, exp->exp_connection->c_remote_uuid.uuid, hdl->cookie, conn->cookie); memset(conn, 0, sizeof *conn); + /* target_handle_connect() treats EALREADY and + * -EALREADY differently */ RETURN(-EALREADY); } } @@ -503,6 +507,8 @@ int target_handle_connect(struct ptlrpc_request *req, svc_handler_t handler) /* If all else goes well, this is our RPC return code. */ req->rq_status = 0; + /* we want to handle EALREADY but *not* -EALREADY from + * target_handle_reconnect() */ if (rc && rc != EALREADY) GOTO(out, rc);