void target_cleanup_recovery(struct obd_device *obd);
int target_queue_recovery_request(struct ptlrpc_request *req,
struct obd_device *obd);
-int target_bulk_io(struct obd_export *exp, struct ptlrpc_bulk_desc *desc,
- struct l_wait_info *lwi);
+int target_bulk_io(struct obd_export *exp, struct ptlrpc_bulk_desc *desc);
#endif
int target_pack_pool_reply(struct ptlrpc_request *req);
return "UNKNOWN";
}
-int target_bulk_io(struct obd_export *exp, struct ptlrpc_bulk_desc *desc,
- struct l_wait_info *lwi)
+int target_bulk_io(struct obd_export *exp, struct ptlrpc_bulk_desc *desc)
{
struct ptlrpc_request *req = desc->bd_req;
time64_t start = ktime_get_real_seconds();
time64_t deadline;
+ struct l_wait_info lwi;
int rc = 0;
ENTRY;
/* If there is eviction in progress, wait for it to finish. */
if (unlikely(atomic_read(&exp->exp_obd->obd_evict_inprogress))) {
- *lwi = LWI_INTR(NULL, NULL);
+ lwi = LWI_INTR(NULL, NULL);
rc = l_wait_event(exp->exp_obd->obd_evict_inprogress_waitq,
!atomic_read(&exp->exp_obd->obd_evict_inprogress),
- lwi);
+ &lwi);
}
/* Check if client was evicted or reconnected already. */
1 : cfs_time_seconds(timeoutl);
time64_t rq_deadline;
- *lwi = LWI_TIMEOUT_INTERVAL(timeout_jiffies,
- cfs_time_seconds(1),
- target_bulk_timeout, desc);
+ lwi = LWI_TIMEOUT_INTERVAL(timeout_jiffies,
+ cfs_time_seconds(1),
+ target_bulk_timeout, desc);
rc = l_wait_event(desc->bd_waitq,
!ptlrpc_server_bulk_active(desc) ||
exp->exp_failed ||
exp->exp_conn_cnt >
lustre_msg_get_conn_cnt(req->rq_reqmsg),
- lwi);
+ &lwi);
LASSERT(rc == 0 || rc == -ETIMEDOUT);
/* Wait again if we changed rq_deadline. */
rq_deadline = READ_ONCE(req->rq_deadline);
struct mgs_config_body *body;
struct mgs_config_res *res;
struct ptlrpc_bulk_desc *desc;
- struct l_wait_info lwi;
char fsname[16];
long bufsize;
int unit_size;
bytes -= PAGE_SIZE;
}
- rc = target_bulk_io(req->rq_export, desc, &lwi);
+ rc = target_bulk_io(req->rq_export, desc);
ptlrpc_free_bulk(desc);
GOTO(out, rc);
struct lu_rdpg rdpg;
struct idx_info nodemap_ii;
struct ptlrpc_bulk_desc *desc;
- struct l_wait_info lwi;
struct tg_export_data *rqexp_ted = &req->rq_export->exp_target_data;
int i;
int page_count;
bytes -= PAGE_SIZE;
}
- rc = target_bulk_io(req->rq_export, desc, &lwi);
+ rc = target_bulk_io(req->rq_export, desc);
ptlrpc_free_bulk(desc);
out:
struct object_update *update;
struct object_update_reply *reply;
struct ptlrpc_bulk_desc *desc = NULL;
- struct l_wait_info lwi;
void **update_bufs;
int current_batchid = -1;
__u32 update_buf_count;
if (rc != 0)
GOTO(out_free, rc = err_serious(rc));
- rc = target_bulk_io(pill->rc_req->rq_export, desc, &lwi);
+ rc = target_bulk_io(pill->rc_req->rq_export, desc);
if (rc < 0)
GOTO(out_free, rc = err_serious(rc));
}
int tgt_send_buffer(struct tgt_session_info *tsi, struct lu_rdbuf *rdbuf)
{
- struct tgt_thread_info *tti = tgt_th_info(tsi->tsi_env);
struct ptlrpc_request *req = tgt_ses_req(tsi);
struct obd_export *exp = req->rq_export;
struct ptlrpc_bulk_desc *desc;
- struct l_wait_info *lwi = &tti->tti_u.update.tti_wait_info;
int i;
int rc;
rdbuf->rb_bufs[i].lb_buf,
rdbuf->rb_bufs[i].lb_len);
- rc = target_bulk_io(exp, desc, lwi);
+ rc = target_bulk_io(exp, desc);
ptlrpc_free_bulk(desc);
RETURN(rc);
}
int tgt_sendpage(struct tgt_session_info *tsi, struct lu_rdpg *rdpg, int nob)
{
- struct tgt_thread_info *tti = tgt_th_info(tsi->tsi_env);
struct ptlrpc_request *req = tgt_ses_req(tsi);
struct obd_export *exp = req->rq_export;
struct ptlrpc_bulk_desc *desc;
- struct l_wait_info *lwi = &tti->tti_u.rdpg.tti_wait_info;
int tmpcount;
int tmpsize;
int i;
}
LASSERT(desc->bd_nob == nob);
- rc = target_bulk_io(exp, desc, lwi);
+ rc = target_bulk_io(exp, desc);
ptlrpc_free_bulk(desc);
RETURN(rc);
}
RCL_SERVER);
rc = rc > 0 ? 0 : rc;
} else if (!CFS_FAIL_PRECHECK(OBD_FAIL_PTLRPC_CLIENT_BULK_CB2)) {
- rc = target_bulk_io(exp, desc, &lwi);
+ rc = target_bulk_io(exp, desc);
}
no_reply = rc != 0;
} else {
lwi1 = LWI_TIMEOUT_INTR(cfs_time_seconds(3), NULL, NULL, NULL);
l_wait_event(waitq, 0, &lwi1);
- target_bulk_io(exp, desc, &lwi);
+ target_bulk_io(exp, desc);
ptlrpc_free_bulk(desc);
}
struct niobuf_local *local_nb;
struct obd_ioobj *ioo;
struct ost_body *body, *repbody;
- struct l_wait_info lwi;
struct lustre_handle lockh = {0};
__u32 *rcs;
int objcount, niocount, npages;
if (rc != 0)
GOTO(skip_transfer, rc);
- rc = target_bulk_io(exp, desc, &lwi);
+ rc = target_bulk_io(exp, desc);
}
no_reply = rc != 0;
struct {
/* for tgt_readpage() */
struct lu_rdpg tti_rdpg;
- /* for tgt_sendpage() */
- struct l_wait_info tti_wait_info;
} rdpg;
struct {
struct dt_object_format tti_update_dof;
int tti_update_reply_index;
struct obdo tti_obdo;
struct dt_object *tti_dt_object;
- struct l_wait_info tti_wait_info;
} update;
struct obd_statfs osfs; /* for obd_statfs() in OFD/MDT */
} tti_u;