LASSERT(list_empty(&crpc->crp_link));
for (i = 0; i < bulk->bk_niov; i++) {
- if (bulk->bk_iovs[i].kiov_page == NULL)
+ if (bulk->bk_iovs[i].bv_page == NULL)
continue;
- __free_page(bulk->bk_iovs[i].kiov_page);
+ __free_page(bulk->bk_iovs[i].bv_page);
}
srpc_client_rpc_decref(crpc->crp_rpc);
lstcon_rpc_stat_failure(stat, 0),
lstcon_rpc_stat_total(stat, 0),
stat->trs_rpc_errno, stat->trs_fwk_errno);
-
- return;
}
int
struct lstcon_rpc *crpc;
struct srpc_msg *msg;
struct lstcon_node *nd;
- struct timeval tv;
+ struct timespec64 ts;
int error;
s64 dur;
dur = crpc->crp_stamp_ns -
console_session.ses_id.ses_stamp * NSEC_PER_MSEC;
- tv = ns_to_timeval(dur);
+ ts = ns_to_timespec64(dur);
if (copy_to_user(&ent->rpe_peer,
&nd->nd_id, sizeof(struct lnet_process_id)) ||
- copy_to_user(&ent->rpe_stamp, &tv, sizeof(tv)) ||
+ copy_to_user(&ent->rpe_stamp, &ts, sizeof(ts)) ||
copy_to_user(&ent->rpe_state,
&nd->nd_state, sizeof(nd->nd_state)) ||
copy_to_user(&ent->rpe_rpc_errno, &error,
lstcon_rpc_trans_name(trans->tas_opc), count);
LIBCFS_FREE(trans, sizeof(*trans));
-
- return;
}
int
}
static struct lnet_process_id_packed *
-lstcon_next_id(int idx, int nkiov, lnet_kiov_t *kiov)
+lstcon_next_id(int idx, int nkiov, struct bio_vec *kiov)
{
struct lnet_process_id_packed *pid;
int i;
LASSERT (i < nkiov);
- pid = (struct lnet_process_id_packed *)page_address(kiov[i].kiov_page);
+ pid = (struct lnet_process_id_packed *)page_address(kiov[i].bv_page);
return &pid[idx % SFW_ID_PER_PAGE];
}
static int
lstcon_dstnodes_prep(struct lstcon_group *grp, int idx,
- int dist, int span, int nkiov, lnet_kiov_t *kiov)
+ int dist, int span, int nkiov, struct bio_vec *kiov)
{
struct lnet_process_id_packed *pid;
struct lstcon_ndlink *ndl;
PAGE_SIZE : min_t(int, nob, PAGE_SIZE);
nob -= len;
- bulk->bk_iovs[i].kiov_offset = 0;
- bulk->bk_iovs[i].kiov_len = len;
- bulk->bk_iovs[i].kiov_page =
+ bulk->bk_iovs[i].bv_offset = 0;
+ bulk->bk_iovs[i].bv_len = len;
+ bulk->bk_iovs[i].bv_page =
alloc_page(GFP_KERNEL);
- if (bulk->bk_iovs[i].kiov_page == NULL) {
+ if (bulk->bk_iovs[i].bv_page == NULL) {
lstcon_rpc_put(*crpc);
return -ENOMEM;
}
if (stat->trs_fwk_errno == 0)
stat->trs_fwk_errno = rc;
-
- return;
}
int
struct lstcon_rpc_trans *trans;
struct lstcon_rpc *crpc;
struct list_head *pacer;
- struct list_head zlist;
+ LIST_HEAD(zlist);
/* Called with hold of global mutex */
CWARN("Session is shutting down, "
"waiting for termination of transactions\n");
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(cfs_time_seconds(1));
+ schedule_timeout_uninterruptible(cfs_time_seconds(1));
mutex_lock(&console_session.ses_mutex);
}
"waiting for %d console RPCs to being recycled\n",
atomic_read(&console_session.ses_rpc_counter));
- list_add(&zlist, &console_session.ses_rpc_freelist);
- list_del_init(&console_session.ses_rpc_freelist);
+ list_splice_init(&console_session.ses_rpc_freelist, &zlist);
spin_unlock(&console_session.ses_rpc_lock);