Lines Matching refs:ses
407 static u32 highest_slotid(struct nfsd4_session *ses) in highest_slotid() argument
411 spin_lock(&ses->se_lock); in highest_slotid()
412 idx = fls(~ses->se_cb_slot_avail); in highest_slotid()
415 idx = max(idx, ses->se_cb_highest_slot); in highest_slotid()
416 spin_unlock(&ses->se_lock); in highest_slotid()
483 static void update_cb_slot_table(struct nfsd4_session *ses, u32 target) in update_cb_slot_table() argument
486 if (likely(target == READ_ONCE(ses->se_cb_highest_slot))) in update_cb_slot_table()
489 spin_lock(&ses->se_lock); in update_cb_slot_table()
490 if (target > ses->se_cb_highest_slot) { in update_cb_slot_table()
501 for (i = ses->se_cb_highest_slot + 1; i <= target; ++i) in update_cb_slot_table()
502 ses->se_cb_seq_nr[i] = 1; in update_cb_slot_table()
504 ses->se_cb_highest_slot = target; in update_cb_slot_table()
505 spin_unlock(&ses->se_lock); in update_cb_slot_table()
1121 … *get_backchannel_cred(struct nfs4_client *clp, struct rpc_clnt *client, struct nfsd4_session *ses) in get_backchannel_cred() argument
1135 kcred->fsuid = ses->se_cb_sec.uid; in get_backchannel_cred()
1136 kcred->fsgid = ses->se_cb_sec.gid; in get_backchannel_cred()
1141 …etup_callback_client(struct nfs4_client *clp, struct nfs4_cb_conn *conn, struct nfsd4_session *ses) in setup_callback_client() argument
1175 if (!conn->cb_xprt || !ses) in setup_callback_client()
1177 clp->cl_cb_session = ses; in setup_callback_client()
1182 args.authflavor = ses->se_cb_sec.flavor; in setup_callback_client()
1190 cred = get_backchannel_cred(clp, client, ses); in setup_callback_client()
1281 static int grab_slot(struct nfsd4_session *ses) in grab_slot() argument
1285 spin_lock(&ses->se_lock); in grab_slot()
1286 idx = ffs(ses->se_cb_slot_avail) - 1; in grab_slot()
1287 if (idx < 0 || idx > ses->se_cb_highest_slot) { in grab_slot()
1288 spin_unlock(&ses->se_lock); in grab_slot()
1292 ses->se_cb_slot_avail &= ~BIT(idx); in grab_slot()
1293 spin_unlock(&ses->se_lock); in grab_slot()
1305 struct nfsd4_session *ses = clp->cl_cb_session; in nfsd41_cb_get_slot() local
1309 cb->cb_held_slot = grab_slot(ses); in nfsd41_cb_get_slot()
1313 cb->cb_held_slot = grab_slot(ses); in nfsd41_cb_get_slot()
1324 struct nfsd4_session *ses = clp->cl_cb_session; in nfsd41_cb_release_slot() local
1327 spin_lock(&ses->se_lock); in nfsd41_cb_release_slot()
1328 ses->se_cb_slot_avail |= BIT(cb->cb_held_slot); in nfsd41_cb_release_slot()
1329 spin_unlock(&ses->se_lock); in nfsd41_cb_release_slot()
1657 struct nfsd4_session *ses = NULL; in nfsd4_process_cb_update() local
1694 ses = c->cn_session; in nfsd4_process_cb_update()
1698 err = setup_callback_client(clp, &conn, ses); in nfsd4_process_cb_update()