Lines Matching refs:cstate

1703 void nfsd4_bump_seqid(struct nfsd4_compound_state *cstate, __be32 nfserr)  in nfsd4_bump_seqid()  argument
1705 struct nfs4_stateowner *so = cstate->replay_owner; in nfsd4_bump_seqid()
1711 nfsd4_cstate_clear_replay(cstate); in nfsd4_bump_seqid()
3085 struct nfsd4_slot *slot = resp->cstate.slot; in nfsd4_store_cache_entry()
3092 slot->sl_status = resp->cstate.status; in nfsd4_store_cache_entry()
3102 base = resp->cstate.data_offset; in nfsd4_store_cache_entry()
3122 struct nfsd4_slot *slot = resp->cstate.slot; in nfsd4_enc_sequence_replay()
3153 struct nfsd4_slot *slot = resp->cstate.slot; in nfsd4_replay_cache_entry()
3233 nfsd4_exchange_id(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_exchange_id() argument
3373 new->cl_minorversion = cstate->minorversion; in nfsd4_exchange_id()
3542 struct nfsd4_compound_state *cstate, union nfsd4_op_u *u) in nfsd4_create_session() argument
3673 struct nfsd4_compound_state *cstate, in nfsd4_backchannel_ctl() argument
3677 struct nfsd4_session *session = cstate->session; in nfsd4_backchannel_ctl()
3736 struct nfsd4_compound_state *cstate, in nfsd4_bind_conn_to_session() argument
3782 static bool nfsd4_compound_in_session(struct nfsd4_compound_state *cstate, struct nfs4_sessionid *s… in nfsd4_compound_in_session() argument
3784 if (!cstate->session) in nfsd4_compound_in_session()
3786 return !memcmp(sid, &cstate->session->se_sessionid, sizeof(*sid)); in nfsd4_compound_in_session()
3790 nfsd4_destroy_session(struct svc_rqst *r, struct nfsd4_compound_state *cstate, in nfsd4_destroy_session() argument
3801 if (nfsd4_compound_in_session(cstate, sessionid)) { in nfsd4_destroy_session()
3908 nfsd4_sequence(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_sequence() argument
3969 cstate->slot = slot; in nfsd4_sequence()
3970 cstate->session = session; in nfsd4_sequence()
3971 cstate->clp = clp; in nfsd4_sequence()
3975 cstate->status = nfserr_replay_cache; in nfsd4_sequence()
4004 cstate->slot = slot; in nfsd4_sequence()
4005 cstate->session = session; in nfsd4_sequence()
4006 cstate->clp = clp; in nfsd4_sequence()
4034 struct nfsd4_compound_state *cs = &resp->cstate; in nfsd4_sequence_done()
4049 struct nfsd4_compound_state *cstate, in nfsd4_destroy_clientid() argument
4094 struct nfsd4_compound_state *cstate, union nfsd4_op_u *u) in nfsd4_reclaim_complete() argument
4097 struct nfs4_client *clp = cstate->clp; in nfsd4_reclaim_complete()
4101 if (!cstate->current_fh.fh_dentry) in nfsd4_reclaim_complete()
4134 nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_setclientid() argument
4192 struct nfsd4_compound_state *cstate, in nfsd4_setclientid_confirm() argument
4425 static void nfsd4_cstate_assign_replay(struct nfsd4_compound_state *cstate, in nfsd4_cstate_assign_replay() argument
4428 if (!nfsd4_has_session(cstate)) { in nfsd4_cstate_assign_replay()
4430 cstate->replay_owner = nfs4_get_stateowner(so); in nfsd4_cstate_assign_replay()
4434 void nfsd4_cstate_clear_replay(struct nfsd4_compound_state *cstate) in nfsd4_cstate_clear_replay() argument
4436 struct nfs4_stateowner *so = cstate->replay_owner; in nfsd4_cstate_clear_replay()
4439 cstate->replay_owner = NULL; in nfsd4_cstate_clear_replay()
4564 struct nfsd4_compound_state *cstate) in alloc_init_open_stateowner() argument
4566 struct nfs4_client *clp = cstate->clp; in alloc_init_open_stateowner()
4576 if (nfsd4_has_session(cstate)) in alloc_init_open_stateowner()
4962 static __be32 nfsd4_check_seqid(struct nfsd4_compound_state *cstate, struct nfs4_stateowner *so, u3… in nfsd4_check_seqid() argument
4964 if (nfsd4_has_session(cstate)) in nfsd4_check_seqid()
4987 struct nfsd4_compound_state *cstate, in set_client() argument
4990 if (cstate->clp) { in set_client()
4991 if (!same_clid(&cstate->clp->cl_clientid, clid)) in set_client()
5001 cstate->clp = lookup_clientid(clid, false, nn); in set_client()
5002 if (!cstate->clp) in set_client()
5008 nfsd4_process_open1(struct nfsd4_compound_state *cstate, in nfsd4_process_open1() argument
5025 status = set_client(clientid, cstate, nn); in nfsd4_process_open1()
5028 clp = cstate->clp; in nfsd4_process_open1()
5042 status = nfsd4_check_seqid(cstate, &oo->oo_owner, open->op_seqid); in nfsd4_process_open1()
5047 oo = alloc_init_open_stateowner(strhashval, open, cstate); in nfsd4_process_open1()
5056 if (nfsd4_has_session(cstate) && in nfsd4_process_open1()
5057 (cstate->current_fh.fh_export->ex_flags & NFSEXP_PNFS)) { in nfsd4_process_open1()
5680 if (nfsd4_has_session(&resp->cstate)) { in nfsd4_process_open2()
5692 nfs4_open_delegation(open, stp, &resp->cstate.current_fh); in nfsd4_process_open2()
5710 if (nfsd4_has_session(&resp->cstate)) in nfsd4_process_open2()
5723 void nfsd4_cleanup_open_state(struct nfsd4_compound_state *cstate, in nfsd4_cleanup_open_state() argument
5729 nfsd4_cstate_assign_replay(cstate, so); in nfsd4_cleanup_open_state()
5741 nfsd4_renew(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_renew() argument
5750 status = set_client(clid, cstate, nn); in nfsd4_renew()
5753 clp = cstate->clp; in nfsd4_renew()
6276 nfsd4_lookup_stateid(struct nfsd4_compound_state *cstate, in nfsd4_lookup_stateid() argument
6296 status = set_client(&stateid->si_opaque.so_clid, cstate, nn); in nfsd4_lookup_stateid()
6298 if (cstate->session) in nfsd4_lookup_stateid()
6304 stid = find_stateid_by_type(cstate->clp, stateid, typemask); in nfsd4_lookup_stateid()
6309 if (cstate->minorversion) in nfsd4_lookup_stateid()
6466 struct nfsd4_compound_state *cstate, struct svc_fh *fhp, in nfs4_preprocess_stateid_op() argument
6487 status = nfsd4_lookup_stateid(cstate, stateid, in nfs4_preprocess_stateid_op()
6495 nfsd4_has_session(cstate)); in nfs4_preprocess_stateid_op()
6532 nfsd4_test_stateid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_test_stateid() argument
6537 struct nfs4_client *cl = cstate->clp; in nfsd4_test_stateid()
6576 nfsd4_free_stateid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_free_stateid() argument
6583 struct nfs4_client *cl = cstate->clp; in nfsd4_free_stateid()
6631 static __be32 nfs4_seqid_op_checks(struct nfsd4_compound_state *cstate, stateid_t *stateid, u32 seq… in nfs4_seqid_op_checks() argument
6633 struct svc_fh *current_fh = &cstate->current_fh; in nfs4_seqid_op_checks()
6637 status = nfsd4_check_seqid(cstate, sop, seqid); in nfs4_seqid_op_checks()
6643 status = check_stateid_generation(stateid, &stp->st_stid.sc_stateid, nfsd4_has_session(cstate)); in nfs4_seqid_op_checks()
6655 nfs4_preprocess_seqid_op(struct nfsd4_compound_state *cstate, u32 seqid, in nfs4_preprocess_seqid_op() argument
6667 status = nfsd4_lookup_stateid(cstate, stateid, typemask, &s, nn); in nfs4_preprocess_seqid_op()
6671 nfsd4_cstate_assign_replay(cstate, stp->st_stateowner); in nfs4_preprocess_seqid_op()
6673 status = nfs4_seqid_op_checks(cstate, stateid, seqid, stp); in nfs4_preprocess_seqid_op()
6681 static __be32 nfs4_preprocess_confirmed_seqid_op(struct nfsd4_compound_state *cstate, u32 seqid, in nfs4_preprocess_confirmed_seqid_op() argument
6688 status = nfs4_preprocess_seqid_op(cstate, seqid, stateid, in nfs4_preprocess_confirmed_seqid_op()
6703 nfsd4_open_confirm(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_open_confirm() argument
6713 cstate->current_fh.fh_dentry); in nfsd4_open_confirm()
6715 status = fh_verify(rqstp, &cstate->current_fh, S_IFREG, 0); in nfsd4_open_confirm()
6719 status = nfs4_preprocess_seqid_op(cstate, in nfsd4_open_confirm()
6739 nfsd4_bump_seqid(cstate, status); in nfsd4_open_confirm()
6771 struct nfsd4_compound_state *cstate, union nfsd4_op_u *u) in nfsd4_open_downgrade() argument
6779 cstate->current_fh.fh_dentry); in nfsd4_open_downgrade()
6786 status = nfs4_preprocess_confirmed_seqid_op(cstate, od->od_seqid, in nfsd4_open_downgrade()
6809 nfsd4_bump_seqid(cstate, status); in nfsd4_open_downgrade()
6842 nfsd4_close(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_close() argument
6852 cstate->current_fh.fh_dentry); in nfsd4_close()
6854 status = nfs4_preprocess_seqid_op(cstate, close->cl_seqid, in nfsd4_close()
6858 nfsd4_bump_seqid(cstate, status); in nfsd4_close()
6891 nfsd4_delegreturn(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_delegreturn() argument
6901 if ((status = fh_verify(rqstp, &cstate->current_fh, S_IFREG, 0))) in nfsd4_delegreturn()
6904 status = nfsd4_lookup_stateid(cstate, stateid, NFS4_DELEG_STID, &s, nn); in nfsd4_delegreturn()
6908 status = nfsd4_stid_check_stateid_generation(stateid, &dp->dl_stid, nfsd4_has_session(cstate)); in nfsd4_delegreturn()
6912 wake_up_var(d_inode(cstate->current_fh.fh_dentry)); in nfsd4_delegreturn()
7251 lookup_or_create_lock_state(struct nfsd4_compound_state *cstate, in lookup_or_create_lock_state() argument
7260 struct inode *inode = d_inode(cstate->current_fh.fh_dentry); in lookup_or_create_lock_state()
7274 if (!cstate->minorversion && in lookup_or_create_lock_state()
7296 nfsd4_lock(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_lock() argument
7325 if ((status = fh_verify(rqstp, &cstate->current_fh, in nfsd4_lock()
7332 if (nfsd4_has_session(cstate)) in nfsd4_lock()
7335 &cstate->clp->cl_clientid, in nfsd4_lock()
7339 status = nfs4_preprocess_confirmed_seqid_op(cstate, in nfsd4_lock()
7351 status = lookup_or_create_lock_state(cstate, open_stp, lock, in nfsd4_lock()
7354 status = nfs4_preprocess_seqid_op(cstate, in nfsd4_lock()
7381 if (nfsd4_has_session(cstate)) in nfsd4_lock()
7393 if (nfsd4_has_session(cstate)) in nfsd4_lock()
7503 if (cstate->replay_owner && in nfsd4_lock()
7504 cstate->replay_owner != &lock_sop->lo_owner && in nfsd4_lock()
7521 nfsd4_bump_seqid(cstate, status); in nfsd4_lock()
7559 nfsd4_lockt(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_lockt() argument
7574 if (!nfsd4_has_session(cstate)) { in nfsd4_lockt()
7575 status = set_client(&lockt->lt_clientid, cstate, nn); in nfsd4_lockt()
7580 if ((status = fh_verify(rqstp, &cstate->current_fh, S_IFREG, 0))) in nfsd4_lockt()
7605 lo = find_lockowner_str(cstate->clp, &lockt->lt_owner); in nfsd4_lockt()
7616 status = nfsd_test_lock(rqstp, &cstate->current_fh, file_lock); in nfsd4_lockt()
7633 nfsd4_locku(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_locku() argument
7651 status = nfs4_preprocess_seqid_op(cstate, locku->lu_seqid, in nfsd4_locku()
7692 nfsd4_bump_seqid(cstate, status); in nfsd4_locku()
7758 struct nfsd4_compound_state *cstate, in nfsd4_release_lockowner() argument
7773 status = set_client(clid, cstate, nn); in nfsd4_release_lockowner()
7776 clp = cstate->clp; in nfsd4_release_lockowner()
8090 get_stateid(struct nfsd4_compound_state *cstate, stateid_t *stateid) in get_stateid() argument
8092 if (HAS_CSTATE_FLAG(cstate, CURRENT_STATE_ID_FLAG) && in get_stateid()
8094 memcpy(stateid, &cstate->current_stateid, sizeof(stateid_t)); in get_stateid()
8098 put_stateid(struct nfsd4_compound_state *cstate, stateid_t *stateid) in put_stateid() argument
8100 if (cstate->minorversion) { in put_stateid()
8101 memcpy(&cstate->current_stateid, stateid, sizeof(stateid_t)); in put_stateid()
8102 SET_CSTATE_FLAG(cstate, CURRENT_STATE_ID_FLAG); in put_stateid()
8107 clear_current_stateid(struct nfsd4_compound_state *cstate) in clear_current_stateid() argument
8109 CLEAR_CSTATE_FLAG(cstate, CURRENT_STATE_ID_FLAG); in clear_current_stateid()
8116 nfsd4_set_opendowngradestateid(struct nfsd4_compound_state *cstate, in nfsd4_set_opendowngradestateid() argument
8119 put_stateid(cstate, &u->open_downgrade.od_stateid); in nfsd4_set_opendowngradestateid()
8123 nfsd4_set_openstateid(struct nfsd4_compound_state *cstate, in nfsd4_set_openstateid() argument
8126 put_stateid(cstate, &u->open.op_stateid); in nfsd4_set_openstateid()
8130 nfsd4_set_closestateid(struct nfsd4_compound_state *cstate, in nfsd4_set_closestateid() argument
8133 put_stateid(cstate, &u->close.cl_stateid); in nfsd4_set_closestateid()
8137 nfsd4_set_lockstateid(struct nfsd4_compound_state *cstate, in nfsd4_set_lockstateid() argument
8140 put_stateid(cstate, &u->lock.lk_resp_stateid); in nfsd4_set_lockstateid()
8148 nfsd4_get_opendowngradestateid(struct nfsd4_compound_state *cstate, in nfsd4_get_opendowngradestateid() argument
8151 get_stateid(cstate, &u->open_downgrade.od_stateid); in nfsd4_get_opendowngradestateid()
8155 nfsd4_get_delegreturnstateid(struct nfsd4_compound_state *cstate, in nfsd4_get_delegreturnstateid() argument
8158 get_stateid(cstate, &u->delegreturn.dr_stateid); in nfsd4_get_delegreturnstateid()
8162 nfsd4_get_freestateid(struct nfsd4_compound_state *cstate, in nfsd4_get_freestateid() argument
8165 get_stateid(cstate, &u->free_stateid.fr_stateid); in nfsd4_get_freestateid()
8169 nfsd4_get_setattrstateid(struct nfsd4_compound_state *cstate, in nfsd4_get_setattrstateid() argument
8172 get_stateid(cstate, &u->setattr.sa_stateid); in nfsd4_get_setattrstateid()
8176 nfsd4_get_closestateid(struct nfsd4_compound_state *cstate, in nfsd4_get_closestateid() argument
8179 get_stateid(cstate, &u->close.cl_stateid); in nfsd4_get_closestateid()
8183 nfsd4_get_lockustateid(struct nfsd4_compound_state *cstate, in nfsd4_get_lockustateid() argument
8186 get_stateid(cstate, &u->locku.lu_stateid); in nfsd4_get_lockustateid()
8190 nfsd4_get_readstateid(struct nfsd4_compound_state *cstate, in nfsd4_get_readstateid() argument
8193 get_stateid(cstate, &u->read.rd_stateid); in nfsd4_get_readstateid()
8197 nfsd4_get_writestateid(struct nfsd4_compound_state *cstate, in nfsd4_get_writestateid() argument
8200 get_stateid(cstate, &u->write.wr_stateid); in nfsd4_get_writestateid()