Lines Matching refs:cstate
1692 void nfsd4_bump_seqid(struct nfsd4_compound_state *cstate, __be32 nfserr) in nfsd4_bump_seqid() argument
1694 struct nfs4_stateowner *so = cstate->replay_owner; in nfsd4_bump_seqid()
1700 nfsd4_cstate_clear_replay(cstate); in nfsd4_bump_seqid()
3070 struct nfsd4_slot *slot = resp->cstate.slot; in nfsd4_store_cache_entry()
3077 slot->sl_status = resp->cstate.status; in nfsd4_store_cache_entry()
3087 base = resp->cstate.data_offset; in nfsd4_store_cache_entry()
3107 struct nfsd4_slot *slot = resp->cstate.slot; in nfsd4_enc_sequence_replay()
3138 struct nfsd4_slot *slot = resp->cstate.slot; in nfsd4_replay_cache_entry()
3218 nfsd4_exchange_id(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_exchange_id() argument
3358 new->cl_minorversion = cstate->minorversion; in nfsd4_exchange_id()
3527 struct nfsd4_compound_state *cstate, union nfsd4_op_u *u) in nfsd4_create_session() argument
3658 struct nfsd4_compound_state *cstate, in nfsd4_backchannel_ctl() argument
3662 struct nfsd4_session *session = cstate->session; in nfsd4_backchannel_ctl()
3721 struct nfsd4_compound_state *cstate, in nfsd4_bind_conn_to_session() argument
3767 static bool nfsd4_compound_in_session(struct nfsd4_compound_state *cstate, struct nfs4_sessionid *s… in nfsd4_compound_in_session() argument
3769 if (!cstate->session) in nfsd4_compound_in_session()
3771 return !memcmp(sid, &cstate->session->se_sessionid, sizeof(*sid)); in nfsd4_compound_in_session()
3775 nfsd4_destroy_session(struct svc_rqst *r, struct nfsd4_compound_state *cstate, in nfsd4_destroy_session() argument
3786 if (nfsd4_compound_in_session(cstate, sessionid)) { in nfsd4_destroy_session()
3893 nfsd4_sequence(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_sequence() argument
3954 cstate->slot = slot; in nfsd4_sequence()
3955 cstate->session = session; in nfsd4_sequence()
3956 cstate->clp = clp; in nfsd4_sequence()
3960 cstate->status = nfserr_replay_cache; in nfsd4_sequence()
3989 cstate->slot = slot; in nfsd4_sequence()
3990 cstate->session = session; in nfsd4_sequence()
3991 cstate->clp = clp; in nfsd4_sequence()
4019 struct nfsd4_compound_state *cs = &resp->cstate; in nfsd4_sequence_done()
4034 struct nfsd4_compound_state *cstate, in nfsd4_destroy_clientid() argument
4079 struct nfsd4_compound_state *cstate, union nfsd4_op_u *u) in nfsd4_reclaim_complete() argument
4082 struct nfs4_client *clp = cstate->clp; in nfsd4_reclaim_complete()
4086 if (!cstate->current_fh.fh_dentry) in nfsd4_reclaim_complete()
4119 nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_setclientid() argument
4177 struct nfsd4_compound_state *cstate, in nfsd4_setclientid_confirm() argument
4410 static void nfsd4_cstate_assign_replay(struct nfsd4_compound_state *cstate, in nfsd4_cstate_assign_replay() argument
4413 if (!nfsd4_has_session(cstate)) { in nfsd4_cstate_assign_replay()
4415 cstate->replay_owner = nfs4_get_stateowner(so); in nfsd4_cstate_assign_replay()
4419 void nfsd4_cstate_clear_replay(struct nfsd4_compound_state *cstate) in nfsd4_cstate_clear_replay() argument
4421 struct nfs4_stateowner *so = cstate->replay_owner; in nfsd4_cstate_clear_replay()
4424 cstate->replay_owner = NULL; in nfsd4_cstate_clear_replay()
4549 struct nfsd4_compound_state *cstate) in alloc_init_open_stateowner() argument
4551 struct nfs4_client *clp = cstate->clp; in alloc_init_open_stateowner()
4561 if (nfsd4_has_session(cstate)) in alloc_init_open_stateowner()
4947 static __be32 nfsd4_check_seqid(struct nfsd4_compound_state *cstate, struct nfs4_stateowner *so, u3… in nfsd4_check_seqid() argument
4949 if (nfsd4_has_session(cstate)) in nfsd4_check_seqid()
4972 struct nfsd4_compound_state *cstate, in set_client() argument
4975 if (cstate->clp) { in set_client()
4976 if (!same_clid(&cstate->clp->cl_clientid, clid)) in set_client()
4986 cstate->clp = lookup_clientid(clid, false, nn); in set_client()
4987 if (!cstate->clp) in set_client()
4993 nfsd4_process_open1(struct nfsd4_compound_state *cstate, in nfsd4_process_open1() argument
5010 status = set_client(clientid, cstate, nn); in nfsd4_process_open1()
5013 clp = cstate->clp; in nfsd4_process_open1()
5027 status = nfsd4_check_seqid(cstate, &oo->oo_owner, open->op_seqid); in nfsd4_process_open1()
5032 oo = alloc_init_open_stateowner(strhashval, open, cstate); in nfsd4_process_open1()
5041 if (nfsd4_has_session(cstate) && in nfsd4_process_open1()
5042 (cstate->current_fh.fh_export->ex_flags & NFSEXP_PNFS)) { in nfsd4_process_open1()
5673 if (nfsd4_has_session(&resp->cstate)) { in nfsd4_process_open2()
5685 nfs4_open_delegation(open, stp, &resp->cstate.current_fh); in nfsd4_process_open2()
5703 if (nfsd4_has_session(&resp->cstate)) in nfsd4_process_open2()
5716 void nfsd4_cleanup_open_state(struct nfsd4_compound_state *cstate, in nfsd4_cleanup_open_state() argument
5722 nfsd4_cstate_assign_replay(cstate, so); in nfsd4_cleanup_open_state()
5734 nfsd4_renew(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_renew() argument
5743 status = set_client(clid, cstate, nn); in nfsd4_renew()
5746 clp = cstate->clp; in nfsd4_renew()
6269 nfsd4_lookup_stateid(struct nfsd4_compound_state *cstate, in nfsd4_lookup_stateid() argument
6289 status = set_client(&stateid->si_opaque.so_clid, cstate, nn); in nfsd4_lookup_stateid()
6291 if (cstate->session) in nfsd4_lookup_stateid()
6297 stid = find_stateid_by_type(cstate->clp, stateid, typemask); in nfsd4_lookup_stateid()
6302 if (cstate->minorversion) in nfsd4_lookup_stateid()
6459 struct nfsd4_compound_state *cstate, struct svc_fh *fhp, in nfs4_preprocess_stateid_op() argument
6480 status = nfsd4_lookup_stateid(cstate, stateid, in nfs4_preprocess_stateid_op()
6488 nfsd4_has_session(cstate)); in nfs4_preprocess_stateid_op()
6525 nfsd4_test_stateid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_test_stateid() argument
6530 struct nfs4_client *cl = cstate->clp; in nfsd4_test_stateid()
6569 nfsd4_free_stateid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_free_stateid() argument
6576 struct nfs4_client *cl = cstate->clp; in nfsd4_free_stateid()
6624 static __be32 nfs4_seqid_op_checks(struct nfsd4_compound_state *cstate, stateid_t *stateid, u32 seq… in nfs4_seqid_op_checks() argument
6626 struct svc_fh *current_fh = &cstate->current_fh; in nfs4_seqid_op_checks()
6630 status = nfsd4_check_seqid(cstate, sop, seqid); in nfs4_seqid_op_checks()
6636 status = check_stateid_generation(stateid, &stp->st_stid.sc_stateid, nfsd4_has_session(cstate)); in nfs4_seqid_op_checks()
6648 nfs4_preprocess_seqid_op(struct nfsd4_compound_state *cstate, u32 seqid, in nfs4_preprocess_seqid_op() argument
6660 status = nfsd4_lookup_stateid(cstate, stateid, typemask, &s, nn); in nfs4_preprocess_seqid_op()
6664 nfsd4_cstate_assign_replay(cstate, stp->st_stateowner); in nfs4_preprocess_seqid_op()
6666 status = nfs4_seqid_op_checks(cstate, stateid, seqid, stp); in nfs4_preprocess_seqid_op()
6674 static __be32 nfs4_preprocess_confirmed_seqid_op(struct nfsd4_compound_state *cstate, u32 seqid, in nfs4_preprocess_confirmed_seqid_op() argument
6681 status = nfs4_preprocess_seqid_op(cstate, seqid, stateid, in nfs4_preprocess_confirmed_seqid_op()
6696 nfsd4_open_confirm(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_open_confirm() argument
6706 cstate->current_fh.fh_dentry); in nfsd4_open_confirm()
6708 status = fh_verify(rqstp, &cstate->current_fh, S_IFREG, 0); in nfsd4_open_confirm()
6712 status = nfs4_preprocess_seqid_op(cstate, in nfsd4_open_confirm()
6732 nfsd4_bump_seqid(cstate, status); in nfsd4_open_confirm()
6764 struct nfsd4_compound_state *cstate, union nfsd4_op_u *u) in nfsd4_open_downgrade() argument
6772 cstate->current_fh.fh_dentry); in nfsd4_open_downgrade()
6779 status = nfs4_preprocess_confirmed_seqid_op(cstate, od->od_seqid, in nfsd4_open_downgrade()
6802 nfsd4_bump_seqid(cstate, status); in nfsd4_open_downgrade()
6835 nfsd4_close(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_close() argument
6845 cstate->current_fh.fh_dentry); in nfsd4_close()
6847 status = nfs4_preprocess_seqid_op(cstate, close->cl_seqid, in nfsd4_close()
6851 nfsd4_bump_seqid(cstate, status); in nfsd4_close()
6884 nfsd4_delegreturn(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_delegreturn() argument
6894 if ((status = fh_verify(rqstp, &cstate->current_fh, S_IFREG, 0))) in nfsd4_delegreturn()
6897 status = nfsd4_lookup_stateid(cstate, stateid, NFS4_DELEG_STID, &s, nn); in nfsd4_delegreturn()
6901 status = nfsd4_stid_check_stateid_generation(stateid, &dp->dl_stid, nfsd4_has_session(cstate)); in nfsd4_delegreturn()
6905 wake_up_var(d_inode(cstate->current_fh.fh_dentry)); in nfsd4_delegreturn()
7244 lookup_or_create_lock_state(struct nfsd4_compound_state *cstate, in lookup_or_create_lock_state() argument
7253 struct inode *inode = d_inode(cstate->current_fh.fh_dentry); in lookup_or_create_lock_state()
7267 if (!cstate->minorversion && in lookup_or_create_lock_state()
7289 nfsd4_lock(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_lock() argument
7318 if ((status = fh_verify(rqstp, &cstate->current_fh, in nfsd4_lock()
7325 if (nfsd4_has_session(cstate)) in nfsd4_lock()
7328 &cstate->clp->cl_clientid, in nfsd4_lock()
7332 status = nfs4_preprocess_confirmed_seqid_op(cstate, in nfsd4_lock()
7344 status = lookup_or_create_lock_state(cstate, open_stp, lock, in nfsd4_lock()
7347 status = nfs4_preprocess_seqid_op(cstate, in nfsd4_lock()
7374 if (nfsd4_has_session(cstate)) in nfsd4_lock()
7386 if (nfsd4_has_session(cstate)) in nfsd4_lock()
7496 if (cstate->replay_owner && in nfsd4_lock()
7497 cstate->replay_owner != &lock_sop->lo_owner && in nfsd4_lock()
7514 nfsd4_bump_seqid(cstate, status); in nfsd4_lock()
7552 nfsd4_lockt(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_lockt() argument
7567 if (!nfsd4_has_session(cstate)) { in nfsd4_lockt()
7568 status = set_client(&lockt->lt_clientid, cstate, nn); in nfsd4_lockt()
7573 if ((status = fh_verify(rqstp, &cstate->current_fh, S_IFREG, 0))) in nfsd4_lockt()
7598 lo = find_lockowner_str(cstate->clp, &lockt->lt_owner); in nfsd4_lockt()
7609 status = nfsd_test_lock(rqstp, &cstate->current_fh, file_lock); in nfsd4_lockt()
7626 nfsd4_locku(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_locku() argument
7644 status = nfs4_preprocess_seqid_op(cstate, locku->lu_seqid, in nfsd4_locku()
7685 nfsd4_bump_seqid(cstate, status); in nfsd4_locku()
7751 struct nfsd4_compound_state *cstate, in nfsd4_release_lockowner() argument
7766 status = set_client(clid, cstate, nn); in nfsd4_release_lockowner()
7769 clp = cstate->clp; in nfsd4_release_lockowner()
8083 get_stateid(struct nfsd4_compound_state *cstate, stateid_t *stateid) in get_stateid() argument
8085 if (HAS_CSTATE_FLAG(cstate, CURRENT_STATE_ID_FLAG) && in get_stateid()
8087 memcpy(stateid, &cstate->current_stateid, sizeof(stateid_t)); in get_stateid()
8091 put_stateid(struct nfsd4_compound_state *cstate, stateid_t *stateid) in put_stateid() argument
8093 if (cstate->minorversion) { in put_stateid()
8094 memcpy(&cstate->current_stateid, stateid, sizeof(stateid_t)); in put_stateid()
8095 SET_CSTATE_FLAG(cstate, CURRENT_STATE_ID_FLAG); in put_stateid()
8100 clear_current_stateid(struct nfsd4_compound_state *cstate) in clear_current_stateid() argument
8102 CLEAR_CSTATE_FLAG(cstate, CURRENT_STATE_ID_FLAG); in clear_current_stateid()
8109 nfsd4_set_opendowngradestateid(struct nfsd4_compound_state *cstate, in nfsd4_set_opendowngradestateid() argument
8112 put_stateid(cstate, &u->open_downgrade.od_stateid); in nfsd4_set_opendowngradestateid()
8116 nfsd4_set_openstateid(struct nfsd4_compound_state *cstate, in nfsd4_set_openstateid() argument
8119 put_stateid(cstate, &u->open.op_stateid); in nfsd4_set_openstateid()
8123 nfsd4_set_closestateid(struct nfsd4_compound_state *cstate, in nfsd4_set_closestateid() argument
8126 put_stateid(cstate, &u->close.cl_stateid); in nfsd4_set_closestateid()
8130 nfsd4_set_lockstateid(struct nfsd4_compound_state *cstate, in nfsd4_set_lockstateid() argument
8133 put_stateid(cstate, &u->lock.lk_resp_stateid); in nfsd4_set_lockstateid()
8141 nfsd4_get_opendowngradestateid(struct nfsd4_compound_state *cstate, in nfsd4_get_opendowngradestateid() argument
8144 get_stateid(cstate, &u->open_downgrade.od_stateid); in nfsd4_get_opendowngradestateid()
8148 nfsd4_get_delegreturnstateid(struct nfsd4_compound_state *cstate, in nfsd4_get_delegreturnstateid() argument
8151 get_stateid(cstate, &u->delegreturn.dr_stateid); in nfsd4_get_delegreturnstateid()
8155 nfsd4_get_freestateid(struct nfsd4_compound_state *cstate, in nfsd4_get_freestateid() argument
8158 get_stateid(cstate, &u->free_stateid.fr_stateid); in nfsd4_get_freestateid()
8162 nfsd4_get_setattrstateid(struct nfsd4_compound_state *cstate, in nfsd4_get_setattrstateid() argument
8165 get_stateid(cstate, &u->setattr.sa_stateid); in nfsd4_get_setattrstateid()
8169 nfsd4_get_closestateid(struct nfsd4_compound_state *cstate, in nfsd4_get_closestateid() argument
8172 get_stateid(cstate, &u->close.cl_stateid); in nfsd4_get_closestateid()
8176 nfsd4_get_lockustateid(struct nfsd4_compound_state *cstate, in nfsd4_get_lockustateid() argument
8179 get_stateid(cstate, &u->locku.lu_stateid); in nfsd4_get_lockustateid()
8183 nfsd4_get_readstateid(struct nfsd4_compound_state *cstate, in nfsd4_get_readstateid() argument
8186 get_stateid(cstate, &u->read.rd_stateid); in nfsd4_get_readstateid()
8190 nfsd4_get_writestateid(struct nfsd4_compound_state *cstate, in nfsd4_get_writestateid() argument
8193 get_stateid(cstate, &u->write.wr_stateid); in nfsd4_get_writestateid()