Lines Matching defs:cli
63 static int fld_req_avail(struct client_obd *cli, struct mdc_cache_waiter *mcw)
67 client_obd_list_lock(&cli->cl_loi_list_lock);
69 client_obd_list_unlock(&cli->cl_loi_list_lock);
73 static void fld_enter_request(struct client_obd *cli)
78 client_obd_list_lock(&cli->cl_loi_list_lock);
79 if (cli->cl_r_in_flight >= cli->cl_max_rpcs_in_flight) {
80 list_add_tail(&mcw.mcw_entry, &cli->cl_cache_waiters);
82 client_obd_list_unlock(&cli->cl_loi_list_lock);
83 l_wait_event(mcw.mcw_waitq, fld_req_avail(cli, &mcw), &lwi);
85 cli->cl_r_in_flight++;
86 client_obd_list_unlock(&cli->cl_loi_list_lock);
90 static void fld_exit_request(struct client_obd *cli)
95 client_obd_list_lock(&cli->cl_loi_list_lock);
96 cli->cl_r_in_flight--;
97 list_for_each_safe(l, tmp, &cli->cl_cache_waiters) {
99 if (cli->cl_r_in_flight >= cli->cl_max_rpcs_in_flight) {
106 cli->cl_r_in_flight++;
109 client_obd_list_unlock(&cli->cl_loi_list_lock);
340 "cli-%s", prefix);
437 mdc_get_rpc_lock(exp->exp_obd->u.cli.cl_rpc_lock, NULL);
438 fld_enter_request(&exp->exp_obd->u.cli);
440 fld_exit_request(&exp->exp_obd->u.cli);
442 mdc_put_rpc_lock(exp->exp_obd->u.cli.cl_rpc_lock, NULL);