Lines Matching refs:cstate

1319 void nfsd4_bump_seqid(struct nfsd4_compound_state *cstate, __be32 nfserr)  in nfsd4_bump_seqid()  argument
1321 struct nfs4_stateowner *so = cstate->replay_owner; in nfsd4_bump_seqid()
1327 nfsd4_cstate_clear_replay(cstate); in nfsd4_bump_seqid()
2209 struct nfsd4_slot *slot = resp->cstate.slot; in nfsd4_store_cache_entry()
2215 slot->sl_status = resp->cstate.status; in nfsd4_store_cache_entry()
2222 base = resp->cstate.data_offset; in nfsd4_store_cache_entry()
2241 struct nfsd4_slot *slot = resp->cstate.slot; in nfsd4_enc_sequence_replay()
2264 struct nfsd4_slot *slot = resp->cstate.slot; in nfsd4_replay_cache_entry()
2321 struct nfsd4_compound_state *cstate, in nfsd4_exchange_id() argument
2418 new->cl_minorversion = cstate->minorversion; in nfsd4_exchange_id()
2579 struct nfsd4_compound_state *cstate, in nfsd4_create_session() argument
2708 __be32 nfsd4_backchannel_ctl(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, struct nf… in nfsd4_backchannel_ctl() argument
2710 struct nfsd4_session *session = cstate->session; in nfsd4_backchannel_ctl()
2728 struct nfsd4_compound_state *cstate, in nfsd4_bind_conn_to_session() argument
2771 struct nfsd4_compound_state *cstate, in nfsd4_destroy_session() argument
2781 if (nfsd4_compound_in_session(cstate->session, &sessionid->sessionid)) { in nfsd4_destroy_session()
2868 struct nfsd4_compound_state *cstate, in nfsd4_sequence() argument
2925 cstate->slot = slot; in nfsd4_sequence()
2926 cstate->session = session; in nfsd4_sequence()
2927 cstate->clp = clp; in nfsd4_sequence()
2931 cstate->status = nfserr_replay_cache; in nfsd4_sequence()
2960 cstate->slot = slot; in nfsd4_sequence()
2961 cstate->session = session; in nfsd4_sequence()
2962 cstate->clp = clp; in nfsd4_sequence()
2990 struct nfsd4_compound_state *cs = &resp->cstate; in nfsd4_sequence_done()
3004 nfsd4_destroy_clientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, struct nfsd4_de… in nfsd4_destroy_clientid() argument
3045 nfsd4_reclaim_complete(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, struct nfsd4_re… in nfsd4_reclaim_complete() argument
3050 if (!cstate->current_fh.fh_dentry) in nfsd4_reclaim_complete()
3061 &cstate->session->se_client->cl_flags)) in nfsd4_reclaim_complete()
3065 if (is_client_expired(cstate->session->se_client)) in nfsd4_reclaim_complete()
3076 nfsd4_client_record_create(cstate->session->se_client); in nfsd4_reclaim_complete()
3082 nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_setclientid() argument
3140 struct nfsd4_compound_state *cstate, in nfsd4_setclientid_confirm() argument
3296 static void nfsd4_cstate_assign_replay(struct nfsd4_compound_state *cstate, in nfsd4_cstate_assign_replay() argument
3299 if (!nfsd4_has_session(cstate)) { in nfsd4_cstate_assign_replay()
3301 cstate->replay_owner = nfs4_get_stateowner(so); in nfsd4_cstate_assign_replay()
3305 void nfsd4_cstate_clear_replay(struct nfsd4_compound_state *cstate) in nfsd4_cstate_clear_replay() argument
3307 struct nfs4_stateowner *so = cstate->replay_owner; in nfsd4_cstate_clear_replay()
3310 cstate->replay_owner = NULL; in nfsd4_cstate_clear_replay()
3366 struct nfsd4_compound_state *cstate) in alloc_init_open_stateowner() argument
3368 struct nfs4_client *clp = cstate->clp; in alloc_init_open_stateowner()
3378 if (nfsd4_has_session(cstate)) in alloc_init_open_stateowner()
3655 static __be32 nfsd4_check_seqid(struct nfsd4_compound_state *cstate, struct nfs4_stateowner *so, u3… in nfsd4_check_seqid() argument
3657 if (nfsd4_has_session(cstate)) in nfsd4_check_seqid()
3667 struct nfsd4_compound_state *cstate, in lookup_clientid() argument
3672 if (cstate->clp) { in lookup_clientid()
3673 found = cstate->clp; in lookup_clientid()
3687 WARN_ON_ONCE(cstate->session); in lookup_clientid()
3698 cstate->clp = found; in lookup_clientid()
3703 nfsd4_process_open1(struct nfsd4_compound_state *cstate, in nfsd4_process_open1() argument
3722 status = lookup_clientid(clientid, cstate, nn); in nfsd4_process_open1()
3725 clp = cstate->clp; in nfsd4_process_open1()
3739 status = nfsd4_check_seqid(cstate, &oo->oo_owner, open->op_seqid); in nfsd4_process_open1()
3744 oo = alloc_init_open_stateowner(strhashval, open, cstate); in nfsd4_process_open1()
3753 if (nfsd4_has_session(cstate) && in nfsd4_process_open1()
3754 (cstate->current_fh.fh_export->ex_flags & NFSEXP_PNFS)) { in nfsd4_process_open1()
4286 if (nfsd4_has_session(&resp->cstate)) { in nfsd4_process_open2()
4313 nfs4_set_claim_prev(open, nfsd4_has_session(&resp->cstate)); in nfsd4_process_open2()
4319 !nfsd4_has_session(&resp->cstate)) in nfsd4_process_open2()
4329 void nfsd4_cleanup_open_state(struct nfsd4_compound_state *cstate, in nfsd4_cleanup_open_state() argument
4335 nfsd4_cstate_assign_replay(cstate, so); in nfsd4_cleanup_open_state()
4347 nfsd4_renew(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_renew() argument
4356 status = lookup_clientid(clid, cstate, nn); in nfsd4_renew()
4359 clp = cstate->clp; in nfsd4_renew()
4655 nfsd4_lookup_stateid(struct nfsd4_compound_state *cstate, in nfsd4_lookup_stateid() argument
4663 status = lookup_clientid(&stateid->si_opaque.so_clid, cstate, nn); in nfsd4_lookup_stateid()
4665 if (cstate->session) in nfsd4_lookup_stateid()
4671 *s = find_stateid_by_type(cstate->clp, stateid, typemask); in nfsd4_lookup_stateid()
4712 nfs4_preprocess_stateid_op(struct net *net, struct nfsd4_compound_state *cstate, in nfs4_preprocess_stateid_op() argument
4715 struct svc_fh *fhp = &cstate->current_fh; in nfs4_preprocess_stateid_op()
4730 status = nfsd4_lookup_stateid(cstate, stateid, in nfs4_preprocess_stateid_op()
4736 nfsd4_has_session(cstate)); in nfs4_preprocess_stateid_op()
4770 nfsd4_test_stateid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_test_stateid() argument
4774 struct nfs4_client *cl = cstate->session->se_client; in nfsd4_test_stateid()
4784 nfsd4_free_stateid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_free_stateid() argument
4791 struct nfs4_client *cl = cstate->session->se_client; in nfsd4_free_stateid()
4844 static __be32 nfs4_seqid_op_checks(struct nfsd4_compound_state *cstate, stateid_t *stateid, u32 seq… in nfs4_seqid_op_checks() argument
4846 struct svc_fh *current_fh = &cstate->current_fh; in nfs4_seqid_op_checks()
4850 status = nfsd4_check_seqid(cstate, sop, seqid); in nfs4_seqid_op_checks()
4862 status = check_stateid_generation(stateid, &stp->st_stid.sc_stateid, nfsd4_has_session(cstate)); in nfs4_seqid_op_checks()
4874 nfs4_preprocess_seqid_op(struct nfsd4_compound_state *cstate, u32 seqid, in nfs4_preprocess_seqid_op() argument
4887 status = nfsd4_lookup_stateid(cstate, stateid, typemask, &s, nn); in nfs4_preprocess_seqid_op()
4891 nfsd4_cstate_assign_replay(cstate, stp->st_stateowner); in nfs4_preprocess_seqid_op()
4893 status = nfs4_seqid_op_checks(cstate, stateid, seqid, stp); in nfs4_preprocess_seqid_op()
4901 static __be32 nfs4_preprocess_confirmed_seqid_op(struct nfsd4_compound_state *cstate, u32 seqid, in nfs4_preprocess_confirmed_seqid_op() argument
4908 status = nfs4_preprocess_seqid_op(cstate, seqid, stateid, in nfs4_preprocess_confirmed_seqid_op()
4923 nfsd4_open_confirm(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_open_confirm() argument
4932 cstate->current_fh.fh_dentry); in nfsd4_open_confirm()
4934 status = fh_verify(rqstp, &cstate->current_fh, S_IFREG, 0); in nfsd4_open_confirm()
4938 status = nfs4_preprocess_seqid_op(cstate, in nfsd4_open_confirm()
4961 nfsd4_bump_seqid(cstate, status); in nfsd4_open_confirm()
4993 struct nfsd4_compound_state *cstate, in nfsd4_open_downgrade() argument
5001 cstate->current_fh.fh_dentry); in nfsd4_open_downgrade()
5008 status = nfs4_preprocess_confirmed_seqid_op(cstate, od->od_seqid, in nfsd4_open_downgrade()
5034 nfsd4_bump_seqid(cstate, status); in nfsd4_open_downgrade()
5065 nfsd4_close(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_close() argument
5074 cstate->current_fh.fh_dentry); in nfsd4_close()
5076 status = nfs4_preprocess_seqid_op(cstate, close->cl_seqid, in nfsd4_close()
5080 nfsd4_bump_seqid(cstate, status); in nfsd4_close()
5096 nfsd4_delegreturn(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_delegreturn() argument
5105 if ((status = fh_verify(rqstp, &cstate->current_fh, S_IFREG, 0))) in nfsd4_delegreturn()
5108 status = nfsd4_lookup_stateid(cstate, stateid, NFS4_DELEG_STID, &s, nn); in nfsd4_delegreturn()
5112 status = check_stateid_generation(stateid, &dp->dl_stid.sc_stateid, nfsd4_has_session(cstate)); in nfsd4_delegreturn()
5394 lookup_or_create_lock_state(struct nfsd4_compound_state *cstate, in lookup_or_create_lock_state() argument
5403 struct inode *inode = d_inode(cstate->current_fh.fh_dentry); in lookup_or_create_lock_state()
5416 if (!cstate->minorversion && in lookup_or_create_lock_state()
5436 nfsd4_lock(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_lock() argument
5461 if ((status = fh_verify(rqstp, &cstate->current_fh, in nfsd4_lock()
5468 if (nfsd4_has_session(cstate)) in nfsd4_lock()
5471 &cstate->session->se_client->cl_clientid, in nfsd4_lock()
5479 status = nfs4_preprocess_confirmed_seqid_op(cstate, in nfsd4_lock()
5491 status = lookup_or_create_lock_state(cstate, open_stp, lock, in nfsd4_lock()
5496 status = nfs4_preprocess_seqid_op(cstate, in nfsd4_lock()
5595 if (cstate->replay_owner && in nfsd4_lock()
5596 cstate->replay_owner != &lock_sop->lo_owner && in nfsd4_lock()
5613 nfsd4_bump_seqid(cstate, status); in nfsd4_lock()
5642 nfsd4_lockt(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_lockt() argument
5656 if (!nfsd4_has_session(cstate)) { in nfsd4_lockt()
5657 status = lookup_clientid(&lockt->lt_clientid, cstate, nn); in nfsd4_lockt()
5662 if ((status = fh_verify(rqstp, &cstate->current_fh, S_IFREG, 0))) in nfsd4_lockt()
5688 cstate->clp); in nfsd4_lockt()
5699 status = nfsd_test_lock(rqstp, &cstate->current_fh, file_lock); in nfsd4_lockt()
5716 nfsd4_locku(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_locku() argument
5733 status = nfs4_preprocess_seqid_op(cstate, locku->lu_seqid, in nfsd4_locku()
5775 nfsd4_bump_seqid(cstate, status); in nfsd4_locku()
5824 struct nfsd4_compound_state *cstate, in nfsd4_release_lockowner() argument
5840 status = lookup_clientid(clid, cstate, nn); in nfsd4_release_lockowner()
5844 clp = cstate->clp; in nfsd4_release_lockowner()
5957 struct nfsd4_compound_state *cstate, in nfs4_check_open_reclaim() argument
5963 status = lookup_clientid(clid, cstate, nn); in nfs4_check_open_reclaim()
5967 if (test_bit(NFSD4_CLIENT_RECLAIM_COMPLETE, &cstate->clp->cl_flags)) in nfs4_check_open_reclaim()
5970 if (nfsd4_client_record_check(cstate->clp)) in nfs4_check_open_reclaim()
6744 get_stateid(struct nfsd4_compound_state *cstate, stateid_t *stateid) in get_stateid() argument
6746 if (HAS_STATE_ID(cstate, CURRENT_STATE_ID_FLAG) && CURRENT_STATEID(stateid)) in get_stateid()
6747 memcpy(stateid, &cstate->current_stateid, sizeof(stateid_t)); in get_stateid()
6751 put_stateid(struct nfsd4_compound_state *cstate, stateid_t *stateid) in put_stateid() argument
6753 if (cstate->minorversion) { in put_stateid()
6754 memcpy(&cstate->current_stateid, stateid, sizeof(stateid_t)); in put_stateid()
6755 SET_STATE_ID(cstate, CURRENT_STATE_ID_FLAG); in put_stateid()
6760 clear_current_stateid(struct nfsd4_compound_state *cstate) in clear_current_stateid() argument
6762 CLEAR_STATE_ID(cstate, CURRENT_STATE_ID_FLAG); in clear_current_stateid()
6769 nfsd4_set_opendowngradestateid(struct nfsd4_compound_state *cstate, struct nfsd4_open_downgrade *od… in nfsd4_set_opendowngradestateid() argument
6771 put_stateid(cstate, &odp->od_stateid); in nfsd4_set_opendowngradestateid()
6775 nfsd4_set_openstateid(struct nfsd4_compound_state *cstate, struct nfsd4_open *open) in nfsd4_set_openstateid() argument
6777 put_stateid(cstate, &open->op_stateid); in nfsd4_set_openstateid()
6781 nfsd4_set_closestateid(struct nfsd4_compound_state *cstate, struct nfsd4_close *close) in nfsd4_set_closestateid() argument
6783 put_stateid(cstate, &close->cl_stateid); in nfsd4_set_closestateid()
6787 nfsd4_set_lockstateid(struct nfsd4_compound_state *cstate, struct nfsd4_lock *lock) in nfsd4_set_lockstateid() argument
6789 put_stateid(cstate, &lock->lk_resp_stateid); in nfsd4_set_lockstateid()
6797 nfsd4_get_opendowngradestateid(struct nfsd4_compound_state *cstate, struct nfsd4_open_downgrade *od… in nfsd4_get_opendowngradestateid() argument
6799 get_stateid(cstate, &odp->od_stateid); in nfsd4_get_opendowngradestateid()
6803 nfsd4_get_delegreturnstateid(struct nfsd4_compound_state *cstate, struct nfsd4_delegreturn *drp) in nfsd4_get_delegreturnstateid() argument
6805 get_stateid(cstate, &drp->dr_stateid); in nfsd4_get_delegreturnstateid()
6809 nfsd4_get_freestateid(struct nfsd4_compound_state *cstate, struct nfsd4_free_stateid *fsp) in nfsd4_get_freestateid() argument
6811 get_stateid(cstate, &fsp->fr_stateid); in nfsd4_get_freestateid()
6815 nfsd4_get_setattrstateid(struct nfsd4_compound_state *cstate, struct nfsd4_setattr *setattr) in nfsd4_get_setattrstateid() argument
6817 get_stateid(cstate, &setattr->sa_stateid); in nfsd4_get_setattrstateid()
6821 nfsd4_get_closestateid(struct nfsd4_compound_state *cstate, struct nfsd4_close *close) in nfsd4_get_closestateid() argument
6823 get_stateid(cstate, &close->cl_stateid); in nfsd4_get_closestateid()
6827 nfsd4_get_lockustateid(struct nfsd4_compound_state *cstate, struct nfsd4_locku *locku) in nfsd4_get_lockustateid() argument
6829 get_stateid(cstate, &locku->lu_stateid); in nfsd4_get_lockustateid()
6833 nfsd4_get_readstateid(struct nfsd4_compound_state *cstate, struct nfsd4_read *read) in nfsd4_get_readstateid() argument
6835 get_stateid(cstate, &read->rd_stateid); in nfsd4_get_readstateid()
6839 nfsd4_get_writestateid(struct nfsd4_compound_state *cstate, struct nfsd4_write *write) in nfsd4_get_writestateid() argument
6841 get_stateid(cstate, &write->wr_stateid); in nfsd4_get_writestateid()