Lines Matching refs:cstate

1337 void nfsd4_bump_seqid(struct nfsd4_compound_state *cstate, __be32 nfserr)  in nfsd4_bump_seqid()  argument
1339 struct nfs4_stateowner *so = cstate->replay_owner; in nfsd4_bump_seqid()
1345 nfsd4_cstate_clear_replay(cstate); in nfsd4_bump_seqid()
2227 struct nfsd4_slot *slot = resp->cstate.slot; in nfsd4_store_cache_entry()
2233 slot->sl_status = resp->cstate.status; in nfsd4_store_cache_entry()
2240 base = resp->cstate.data_offset; in nfsd4_store_cache_entry()
2259 struct nfsd4_slot *slot = resp->cstate.slot; in nfsd4_enc_sequence_replay()
2282 struct nfsd4_slot *slot = resp->cstate.slot; in nfsd4_replay_cache_entry()
2347 struct nfsd4_compound_state *cstate, in nfsd4_exchange_id() argument
2444 new->cl_minorversion = cstate->minorversion; in nfsd4_exchange_id()
2605 struct nfsd4_compound_state *cstate, in nfsd4_create_session() argument
2732 __be32 nfsd4_backchannel_ctl(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, struct nf… in nfsd4_backchannel_ctl() argument
2734 struct nfsd4_session *session = cstate->session; in nfsd4_backchannel_ctl()
2752 struct nfsd4_compound_state *cstate, in nfsd4_bind_conn_to_session() argument
2795 struct nfsd4_compound_state *cstate, in nfsd4_destroy_session() argument
2805 if (nfsd4_compound_in_session(cstate->session, &sessionid->sessionid)) { in nfsd4_destroy_session()
2892 struct nfsd4_compound_state *cstate, in nfsd4_sequence() argument
2949 cstate->slot = slot; in nfsd4_sequence()
2950 cstate->session = session; in nfsd4_sequence()
2951 cstate->clp = clp; in nfsd4_sequence()
2955 cstate->status = nfserr_replay_cache; in nfsd4_sequence()
2984 cstate->slot = slot; in nfsd4_sequence()
2985 cstate->session = session; in nfsd4_sequence()
2986 cstate->clp = clp; in nfsd4_sequence()
3014 struct nfsd4_compound_state *cs = &resp->cstate; in nfsd4_sequence_done()
3028 nfsd4_destroy_clientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, struct nfsd4_de… in nfsd4_destroy_clientid() argument
3069 nfsd4_reclaim_complete(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, struct nfsd4_re… in nfsd4_reclaim_complete() argument
3074 if (!cstate->current_fh.fh_dentry) in nfsd4_reclaim_complete()
3085 &cstate->session->se_client->cl_flags)) in nfsd4_reclaim_complete()
3089 if (is_client_expired(cstate->session->se_client)) in nfsd4_reclaim_complete()
3100 nfsd4_client_record_create(cstate->session->se_client); in nfsd4_reclaim_complete()
3106 nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_setclientid() argument
3165 struct nfsd4_compound_state *cstate, in nfsd4_setclientid_confirm() argument
3327 static void nfsd4_cstate_assign_replay(struct nfsd4_compound_state *cstate, in nfsd4_cstate_assign_replay() argument
3330 if (!nfsd4_has_session(cstate)) { in nfsd4_cstate_assign_replay()
3332 cstate->replay_owner = nfs4_get_stateowner(so); in nfsd4_cstate_assign_replay()
3336 void nfsd4_cstate_clear_replay(struct nfsd4_compound_state *cstate) in nfsd4_cstate_clear_replay() argument
3338 struct nfs4_stateowner *so = cstate->replay_owner; in nfsd4_cstate_clear_replay()
3341 cstate->replay_owner = NULL; in nfsd4_cstate_clear_replay()
3418 struct nfsd4_compound_state *cstate) in alloc_init_open_stateowner() argument
3420 struct nfs4_client *clp = cstate->clp; in alloc_init_open_stateowner()
3430 if (nfsd4_has_session(cstate)) in alloc_init_open_stateowner()
3723 static __be32 nfsd4_check_seqid(struct nfsd4_compound_state *cstate, struct nfs4_stateowner *so, u3… in nfsd4_check_seqid() argument
3725 if (nfsd4_has_session(cstate)) in nfsd4_check_seqid()
3735 struct nfsd4_compound_state *cstate, in lookup_clientid() argument
3740 if (cstate->clp) { in lookup_clientid()
3741 found = cstate->clp; in lookup_clientid()
3755 WARN_ON_ONCE(cstate->session); in lookup_clientid()
3766 cstate->clp = found; in lookup_clientid()
3771 nfsd4_process_open1(struct nfsd4_compound_state *cstate, in nfsd4_process_open1() argument
3790 status = lookup_clientid(clientid, cstate, nn); in nfsd4_process_open1()
3793 clp = cstate->clp; in nfsd4_process_open1()
3807 status = nfsd4_check_seqid(cstate, &oo->oo_owner, open->op_seqid); in nfsd4_process_open1()
3812 oo = alloc_init_open_stateowner(strhashval, open, cstate); in nfsd4_process_open1()
3821 if (nfsd4_has_session(cstate) && in nfsd4_process_open1()
3822 (cstate->current_fh.fh_export->ex_flags & NFSEXP_PNFS)) { in nfsd4_process_open1()
4342 if (nfsd4_has_session(&resp->cstate)) { in nfsd4_process_open2()
4375 !nfsd4_has_session(&resp->cstate)) in nfsd4_process_open2()
4385 void nfsd4_cleanup_open_state(struct nfsd4_compound_state *cstate, in nfsd4_cleanup_open_state() argument
4391 nfsd4_cstate_assign_replay(cstate, so); in nfsd4_cleanup_open_state()
4403 nfsd4_renew(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_renew() argument
4412 status = lookup_clientid(clid, cstate, nn); in nfsd4_renew()
4415 clp = cstate->clp; in nfsd4_renew()
4709 nfsd4_lookup_stateid(struct nfsd4_compound_state *cstate, in nfsd4_lookup_stateid() argument
4717 status = lookup_clientid(&stateid->si_opaque.so_clid, cstate, nn); in nfsd4_lookup_stateid()
4719 if (cstate->session) in nfsd4_lookup_stateid()
4725 *s = find_stateid_by_type(cstate->clp, stateid, typemask); in nfsd4_lookup_stateid()
4800 struct nfsd4_compound_state *cstate, stateid_t *stateid, in nfs4_preprocess_stateid_op() argument
4803 struct svc_fh *fhp = &cstate->current_fh; in nfs4_preprocess_stateid_op()
4823 status = nfsd4_lookup_stateid(cstate, stateid, in nfs4_preprocess_stateid_op()
4829 nfsd4_has_session(cstate)); in nfs4_preprocess_stateid_op()
4862 nfsd4_test_stateid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_test_stateid() argument
4866 struct nfs4_client *cl = cstate->session->se_client; in nfsd4_test_stateid()
4876 nfsd4_free_stateid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_free_stateid() argument
4883 struct nfs4_client *cl = cstate->session->se_client; in nfsd4_free_stateid()
4936 static __be32 nfs4_seqid_op_checks(struct nfsd4_compound_state *cstate, stateid_t *stateid, u32 seq… in nfs4_seqid_op_checks() argument
4938 struct svc_fh *current_fh = &cstate->current_fh; in nfs4_seqid_op_checks()
4942 status = nfsd4_check_seqid(cstate, sop, seqid); in nfs4_seqid_op_checks()
4954 status = check_stateid_generation(stateid, &stp->st_stid.sc_stateid, nfsd4_has_session(cstate)); in nfs4_seqid_op_checks()
4966 nfs4_preprocess_seqid_op(struct nfsd4_compound_state *cstate, u32 seqid, in nfs4_preprocess_seqid_op() argument
4979 status = nfsd4_lookup_stateid(cstate, stateid, typemask, &s, nn); in nfs4_preprocess_seqid_op()
4983 nfsd4_cstate_assign_replay(cstate, stp->st_stateowner); in nfs4_preprocess_seqid_op()
4985 status = nfs4_seqid_op_checks(cstate, stateid, seqid, stp); in nfs4_preprocess_seqid_op()
4993 static __be32 nfs4_preprocess_confirmed_seqid_op(struct nfsd4_compound_state *cstate, u32 seqid, in nfs4_preprocess_confirmed_seqid_op() argument
5000 status = nfs4_preprocess_seqid_op(cstate, seqid, stateid, in nfs4_preprocess_confirmed_seqid_op()
5015 nfsd4_open_confirm(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_open_confirm() argument
5024 cstate->current_fh.fh_dentry); in nfsd4_open_confirm()
5026 status = fh_verify(rqstp, &cstate->current_fh, S_IFREG, 0); in nfsd4_open_confirm()
5030 status = nfs4_preprocess_seqid_op(cstate, in nfsd4_open_confirm()
5052 nfsd4_bump_seqid(cstate, status); in nfsd4_open_confirm()
5084 struct nfsd4_compound_state *cstate, in nfsd4_open_downgrade() argument
5092 cstate->current_fh.fh_dentry); in nfsd4_open_downgrade()
5099 status = nfs4_preprocess_confirmed_seqid_op(cstate, od->od_seqid, in nfsd4_open_downgrade()
5122 nfsd4_bump_seqid(cstate, status); in nfsd4_open_downgrade()
5153 nfsd4_close(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_close() argument
5162 cstate->current_fh.fh_dentry); in nfsd4_close()
5164 status = nfs4_preprocess_seqid_op(cstate, close->cl_seqid, in nfsd4_close()
5168 nfsd4_bump_seqid(cstate, status); in nfsd4_close()
5183 nfsd4_delegreturn(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_delegreturn() argument
5192 if ((status = fh_verify(rqstp, &cstate->current_fh, S_IFREG, 0))) in nfsd4_delegreturn()
5195 status = nfsd4_lookup_stateid(cstate, stateid, NFS4_DELEG_STID, &s, nn); in nfsd4_delegreturn()
5199 status = check_stateid_generation(stateid, &dp->dl_stid.sc_stateid, nfsd4_has_session(cstate)); in nfsd4_delegreturn()
5476 lookup_or_create_lock_state(struct nfsd4_compound_state *cstate, in lookup_or_create_lock_state() argument
5485 struct inode *inode = d_inode(cstate->current_fh.fh_dentry); in lookup_or_create_lock_state()
5498 if (!cstate->minorversion && in lookup_or_create_lock_state()
5518 nfsd4_lock(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_lock() argument
5543 if ((status = fh_verify(rqstp, &cstate->current_fh, in nfsd4_lock()
5550 if (nfsd4_has_session(cstate)) in nfsd4_lock()
5553 &cstate->session->se_client->cl_clientid, in nfsd4_lock()
5561 status = nfs4_preprocess_confirmed_seqid_op(cstate, in nfsd4_lock()
5573 status = lookup_or_create_lock_state(cstate, open_stp, lock, in nfsd4_lock()
5578 status = nfs4_preprocess_seqid_op(cstate, in nfsd4_lock()
5675 if (cstate->replay_owner && in nfsd4_lock()
5676 cstate->replay_owner != &lock_sop->lo_owner && in nfsd4_lock()
5693 nfsd4_bump_seqid(cstate, status); in nfsd4_lock()
5722 nfsd4_lockt(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_lockt() argument
5736 if (!nfsd4_has_session(cstate)) { in nfsd4_lockt()
5737 status = lookup_clientid(&lockt->lt_clientid, cstate, nn); in nfsd4_lockt()
5742 if ((status = fh_verify(rqstp, &cstate->current_fh, S_IFREG, 0))) in nfsd4_lockt()
5767 lo = find_lockowner_str(cstate->clp, &lockt->lt_owner); in nfsd4_lockt()
5778 status = nfsd_test_lock(rqstp, &cstate->current_fh, file_lock); in nfsd4_lockt()
5795 nfsd4_locku(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_locku() argument
5812 status = nfs4_preprocess_seqid_op(cstate, locku->lu_seqid, in nfsd4_locku()
5853 nfsd4_bump_seqid(cstate, status); in nfsd4_locku()
5902 struct nfsd4_compound_state *cstate, in nfsd4_release_lockowner() argument
5918 status = lookup_clientid(clid, cstate, nn); in nfsd4_release_lockowner()
5922 clp = cstate->clp; in nfsd4_release_lockowner()
6035 struct nfsd4_compound_state *cstate, in nfs4_check_open_reclaim() argument
6041 status = lookup_clientid(clid, cstate, nn); in nfs4_check_open_reclaim()
6045 if (test_bit(NFSD4_CLIENT_RECLAIM_COMPLETE, &cstate->clp->cl_flags)) in nfs4_check_open_reclaim()
6048 if (nfsd4_client_record_check(cstate->clp)) in nfs4_check_open_reclaim()
6823 get_stateid(struct nfsd4_compound_state *cstate, stateid_t *stateid) in get_stateid() argument
6825 if (HAS_STATE_ID(cstate, CURRENT_STATE_ID_FLAG) && CURRENT_STATEID(stateid)) in get_stateid()
6826 memcpy(stateid, &cstate->current_stateid, sizeof(stateid_t)); in get_stateid()
6830 put_stateid(struct nfsd4_compound_state *cstate, stateid_t *stateid) in put_stateid() argument
6832 if (cstate->minorversion) { in put_stateid()
6833 memcpy(&cstate->current_stateid, stateid, sizeof(stateid_t)); in put_stateid()
6834 SET_STATE_ID(cstate, CURRENT_STATE_ID_FLAG); in put_stateid()
6839 clear_current_stateid(struct nfsd4_compound_state *cstate) in clear_current_stateid() argument
6841 CLEAR_STATE_ID(cstate, CURRENT_STATE_ID_FLAG); in clear_current_stateid()
6848 nfsd4_set_opendowngradestateid(struct nfsd4_compound_state *cstate, struct nfsd4_open_downgrade *od… in nfsd4_set_opendowngradestateid() argument
6850 put_stateid(cstate, &odp->od_stateid); in nfsd4_set_opendowngradestateid()
6854 nfsd4_set_openstateid(struct nfsd4_compound_state *cstate, struct nfsd4_open *open) in nfsd4_set_openstateid() argument
6856 put_stateid(cstate, &open->op_stateid); in nfsd4_set_openstateid()
6860 nfsd4_set_closestateid(struct nfsd4_compound_state *cstate, struct nfsd4_close *close) in nfsd4_set_closestateid() argument
6862 put_stateid(cstate, &close->cl_stateid); in nfsd4_set_closestateid()
6866 nfsd4_set_lockstateid(struct nfsd4_compound_state *cstate, struct nfsd4_lock *lock) in nfsd4_set_lockstateid() argument
6868 put_stateid(cstate, &lock->lk_resp_stateid); in nfsd4_set_lockstateid()
6876 nfsd4_get_opendowngradestateid(struct nfsd4_compound_state *cstate, struct nfsd4_open_downgrade *od… in nfsd4_get_opendowngradestateid() argument
6878 get_stateid(cstate, &odp->od_stateid); in nfsd4_get_opendowngradestateid()
6882 nfsd4_get_delegreturnstateid(struct nfsd4_compound_state *cstate, struct nfsd4_delegreturn *drp) in nfsd4_get_delegreturnstateid() argument
6884 get_stateid(cstate, &drp->dr_stateid); in nfsd4_get_delegreturnstateid()
6888 nfsd4_get_freestateid(struct nfsd4_compound_state *cstate, struct nfsd4_free_stateid *fsp) in nfsd4_get_freestateid() argument
6890 get_stateid(cstate, &fsp->fr_stateid); in nfsd4_get_freestateid()
6894 nfsd4_get_setattrstateid(struct nfsd4_compound_state *cstate, struct nfsd4_setattr *setattr) in nfsd4_get_setattrstateid() argument
6896 get_stateid(cstate, &setattr->sa_stateid); in nfsd4_get_setattrstateid()
6900 nfsd4_get_closestateid(struct nfsd4_compound_state *cstate, struct nfsd4_close *close) in nfsd4_get_closestateid() argument
6902 get_stateid(cstate, &close->cl_stateid); in nfsd4_get_closestateid()
6906 nfsd4_get_lockustateid(struct nfsd4_compound_state *cstate, struct nfsd4_locku *locku) in nfsd4_get_lockustateid() argument
6908 get_stateid(cstate, &locku->lu_stateid); in nfsd4_get_lockustateid()
6912 nfsd4_get_readstateid(struct nfsd4_compound_state *cstate, struct nfsd4_read *read) in nfsd4_get_readstateid() argument
6914 get_stateid(cstate, &read->rd_stateid); in nfsd4_get_readstateid()
6918 nfsd4_get_writestateid(struct nfsd4_compound_state *cstate, struct nfsd4_write *write) in nfsd4_get_writestateid() argument
6920 get_stateid(cstate, &write->wr_stateid); in nfsd4_get_writestateid()