/* SEQ_MAXREPSIZE == lustre_msg + ptlrpc_body + lu_range */
#define SEQ_MAXREPSIZE (152)
-#define MGS_THREADS_AUTO_MIN 2
+/* MGS threads must be >= 3, see bug 22458 comment #28 */
+#define MGS_THREADS_AUTO_MIN 3
#define MGS_THREADS_AUTO_MAX 32
#define MGS_NBUFS (64 * cfs_num_online_cpus())
#define MGS_BUFSIZE (8 * 1024)
/* client+server request */
lnet_handle_md_t rq_req_md_h;
struct ptlrpc_cb_id rq_req_cbid;
+ cfs_duration_t rq_delay_limit; /* optional time limit for send attempts */
+ cfs_time_t rq_queued_time; /* time request was first queued */
/* server-side... */
struct timeval rq_arrival_time; /* request arrival time */
}
}
+static inline int ptlrpc_send_limit_expired(struct ptlrpc_request *req)
+{
+ if (req->rq_delay_limit != 0 &&
+ cfs_time_before(cfs_time_add(req->rq_queued_time,
+ cfs_time_seconds(req->rq_delay_limit)),
+ cfs_time_current())) {
+ return 1;
+ }
+ return 0;
+}
+
+static inline int ptlrpc_no_resend(struct ptlrpc_request *req)
+{
+ if (!req->rq_no_resend && ptlrpc_send_limit_expired(req)) {
+ cfs_spin_lock(&req->rq_lock);
+ req->rq_no_resend = 1;
+ cfs_spin_unlock(&req->rq_lock);
+ }
+ return req->rq_no_resend;
+}
+
/* ldlm/ldlm_lib.c */
int client_obd_setup(struct obd_device *obddev, struct lustre_cfg *lcfg);
int client_obd_cleanup(struct obd_device *obddev);