int rc = 0;
char *target_start;
int target_len;
- int mds_conn = 0;
+ bool mds_conn = false, lw_client = false;
struct obd_connect_data *data, *tmpdata;
int size, tmpsize;
lnet_nid_t *client_nid = NULL;
if ((lustre_msg_get_op_flags(req->rq_reqmsg) & MSG_CONNECT_INITIAL) &&
(data->ocd_connect_flags & OBD_CONNECT_MDS))
- mds_conn = 1;
+ mds_conn = true;
+
+ if ((data->ocd_connect_flags & OBD_CONNECT_LIGHTWEIGHT) != 0)
+ lw_client = true;
/* lctl gets a backstage, all-access pass. */
if (obd_uuid_equals(&cluuid, &target->obd_uuid))
export ? (long)export->exp_last_request_time : 0);
/* If this is the first time a client connects, reset the recovery
- * timer */
- if (rc == 0 && target->obd_recovering)
+ * timer. Discard lightweight connections which might be local */
+ if (!lw_client && rc == 0 && target->obd_recovering)
check_and_start_recovery_timer(target, req, export == NULL);
/* We want to handle EALREADY but *not* -EALREADY from
client_nid = &req->rq_peer.nid;
if (export == NULL) {
- if (target->obd_recovering) {
+ /* allow lightweight connections during recovery */
+ if (target->obd_recovering && !lw_client) {
cfs_time_t t;
int c; /* connected */
int i; /* in progress */
&export->exp_nid_hash);
}
- if (target->obd_recovering && !export->exp_in_recovery) {
+ if (target->obd_recovering && !export->exp_in_recovery && !lw_client) {
int has_transno;
__u64 transno = data->ocd_transno;
}
/* Tell the client we're in recovery, when client is involved in it. */
- if (target->obd_recovering)
+ if (target->obd_recovering && !lw_client)
lustre_msg_add_op_flags(req->rq_repmsg, MSG_CONNECT_RECOVERING);
tmp = req_capsule_client_get(&req->rq_pill, &RMF_CONN);