Lines Matching refs:cstate

1572 void nfsd4_bump_seqid(struct nfsd4_compound_state *cstate, __be32 nfserr)  in nfsd4_bump_seqid()  argument
1574 struct nfs4_stateowner *so = cstate->replay_owner; in nfsd4_bump_seqid()
1580 nfsd4_cstate_clear_replay(cstate); in nfsd4_bump_seqid()
2914 struct nfsd4_slot *slot = resp->cstate.slot; in nfsd4_store_cache_entry()
2921 slot->sl_status = resp->cstate.status; in nfsd4_store_cache_entry()
2931 base = resp->cstate.data_offset; in nfsd4_store_cache_entry()
2951 struct nfsd4_slot *slot = resp->cstate.slot; in nfsd4_enc_sequence_replay()
2982 struct nfsd4_slot *slot = resp->cstate.slot; in nfsd4_replay_cache_entry()
3062 nfsd4_exchange_id(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_exchange_id() argument
3194 new->cl_minorversion = cstate->minorversion; in nfsd4_exchange_id()
3361 struct nfsd4_compound_state *cstate, union nfsd4_op_u *u) in nfsd4_create_session() argument
3488 struct nfsd4_compound_state *cstate, in nfsd4_backchannel_ctl() argument
3492 struct nfsd4_session *session = cstate->session; in nfsd4_backchannel_ctl()
3551 struct nfsd4_compound_state *cstate, in nfsd4_bind_conn_to_session() argument
3597 static bool nfsd4_compound_in_session(struct nfsd4_compound_state *cstate, struct nfs4_sessionid *s… in nfsd4_compound_in_session() argument
3599 if (!cstate->session) in nfsd4_compound_in_session()
3601 return !memcmp(sid, &cstate->session->se_sessionid, sizeof(*sid)); in nfsd4_compound_in_session()
3605 nfsd4_destroy_session(struct svc_rqst *r, struct nfsd4_compound_state *cstate, in nfsd4_destroy_session() argument
3616 if (nfsd4_compound_in_session(cstate, sessionid)) { in nfsd4_destroy_session()
3723 nfsd4_sequence(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_sequence() argument
3784 cstate->slot = slot; in nfsd4_sequence()
3785 cstate->session = session; in nfsd4_sequence()
3786 cstate->clp = clp; in nfsd4_sequence()
3790 cstate->status = nfserr_replay_cache; in nfsd4_sequence()
3819 cstate->slot = slot; in nfsd4_sequence()
3820 cstate->session = session; in nfsd4_sequence()
3821 cstate->clp = clp; in nfsd4_sequence()
3849 struct nfsd4_compound_state *cs = &resp->cstate; in nfsd4_sequence_done()
3864 struct nfsd4_compound_state *cstate, in nfsd4_destroy_clientid() argument
3908 struct nfsd4_compound_state *cstate, union nfsd4_op_u *u) in nfsd4_reclaim_complete() argument
3914 if (!cstate->current_fh.fh_dentry) in nfsd4_reclaim_complete()
3925 &cstate->session->se_client->cl_flags)) in nfsd4_reclaim_complete()
3929 if (is_client_expired(cstate->session->se_client)) in nfsd4_reclaim_complete()
3940 nfsd4_client_record_create(cstate->session->se_client); in nfsd4_reclaim_complete()
3941 inc_reclaim_complete(cstate->session->se_client); in nfsd4_reclaim_complete()
3947 nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_setclientid() argument
4002 struct nfsd4_compound_state *cstate, in nfsd4_setclientid_confirm() argument
4175 static void nfsd4_cstate_assign_replay(struct nfsd4_compound_state *cstate, in nfsd4_cstate_assign_replay() argument
4178 if (!nfsd4_has_session(cstate)) { in nfsd4_cstate_assign_replay()
4180 cstate->replay_owner = nfs4_get_stateowner(so); in nfsd4_cstate_assign_replay()
4184 void nfsd4_cstate_clear_replay(struct nfsd4_compound_state *cstate) in nfsd4_cstate_clear_replay() argument
4186 struct nfs4_stateowner *so = cstate->replay_owner; in nfsd4_cstate_clear_replay()
4189 cstate->replay_owner = NULL; in nfsd4_cstate_clear_replay()
4314 struct nfsd4_compound_state *cstate) in alloc_init_open_stateowner() argument
4316 struct nfs4_client *clp = cstate->clp; in alloc_init_open_stateowner()
4326 if (nfsd4_has_session(cstate)) in alloc_init_open_stateowner()
4652 static __be32 nfsd4_check_seqid(struct nfsd4_compound_state *cstate, struct nfs4_stateowner *so, u3… in nfsd4_check_seqid() argument
4654 if (nfsd4_has_session(cstate)) in nfsd4_check_seqid()
4664 struct nfsd4_compound_state *cstate, in lookup_clientid() argument
4670 if (cstate->clp) { in lookup_clientid()
4671 found = cstate->clp; in lookup_clientid()
4685 WARN_ON_ONCE(cstate->session); in lookup_clientid()
4696 cstate->clp = found; in lookup_clientid()
4701 nfsd4_process_open1(struct nfsd4_compound_state *cstate, in nfsd4_process_open1() argument
4720 status = lookup_clientid(clientid, cstate, nn, false); in nfsd4_process_open1()
4723 clp = cstate->clp; in nfsd4_process_open1()
4737 status = nfsd4_check_seqid(cstate, &oo->oo_owner, open->op_seqid); in nfsd4_process_open1()
4742 oo = alloc_init_open_stateowner(strhashval, open, cstate); in nfsd4_process_open1()
4751 if (nfsd4_has_session(cstate) && in nfsd4_process_open1()
4752 (cstate->current_fh.fh_export->ex_flags & NFSEXP_PNFS)) { in nfsd4_process_open1()
5240 if (nfsd4_has_session(&resp->cstate)) { in nfsd4_process_open2()
5270 if (nfsd4_has_session(&resp->cstate)) in nfsd4_process_open2()
5283 void nfsd4_cleanup_open_state(struct nfsd4_compound_state *cstate, in nfsd4_cleanup_open_state() argument
5289 nfsd4_cstate_assign_replay(cstate, so); in nfsd4_cleanup_open_state()
5301 nfsd4_renew(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_renew() argument
5310 status = lookup_clientid(clid, cstate, nn, false); in nfsd4_renew()
5313 clp = cstate->clp; in nfsd4_renew()
5677 nfsd4_lookup_stateid(struct nfsd4_compound_state *cstate, in nfsd4_lookup_stateid() argument
5696 status = lookup_clientid(&stateid->si_opaque.so_clid, cstate, nn, in nfsd4_lookup_stateid()
5699 if (cstate->session) in nfsd4_lookup_stateid()
5705 *s = find_stateid_by_type(cstate->clp, stateid, typemask); in nfsd4_lookup_stateid()
5710 if (cstate->minorversion) in nfsd4_lookup_stateid()
5828 struct nfsd4_compound_state cstate; in find_cpntf_state() local
5835 memset(&cstate, 0, sizeof(cstate)); in find_cpntf_state()
5836 status = lookup_clientid(&cps->cp_p_clid, &cstate, nn, true); in find_cpntf_state()
5839 status = nfsd4_lookup_stateid(&cstate, &cps->cp_p_stateid, in find_cpntf_state()
5842 put_client_renew(cstate.clp); in find_cpntf_state()
5860 struct nfsd4_compound_state *cstate, struct svc_fh *fhp, in nfs4_preprocess_stateid_op() argument
5881 status = nfsd4_lookup_stateid(cstate, stateid, in nfs4_preprocess_stateid_op()
5889 nfsd4_has_session(cstate)); in nfs4_preprocess_stateid_op()
5926 nfsd4_test_stateid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_test_stateid() argument
5931 struct nfs4_client *cl = cstate->session->se_client; in nfsd4_test_stateid()
5970 nfsd4_free_stateid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_free_stateid() argument
5977 struct nfs4_client *cl = cstate->session->se_client; in nfsd4_free_stateid()
6025 static __be32 nfs4_seqid_op_checks(struct nfsd4_compound_state *cstate, stateid_t *stateid, u32 seq… in nfs4_seqid_op_checks() argument
6027 struct svc_fh *current_fh = &cstate->current_fh; in nfs4_seqid_op_checks()
6031 status = nfsd4_check_seqid(cstate, sop, seqid); in nfs4_seqid_op_checks()
6037 status = check_stateid_generation(stateid, &stp->st_stid.sc_stateid, nfsd4_has_session(cstate)); in nfs4_seqid_op_checks()
6049 nfs4_preprocess_seqid_op(struct nfsd4_compound_state *cstate, u32 seqid, in nfs4_preprocess_seqid_op() argument
6061 status = nfsd4_lookup_stateid(cstate, stateid, typemask, &s, nn); in nfs4_preprocess_seqid_op()
6065 nfsd4_cstate_assign_replay(cstate, stp->st_stateowner); in nfs4_preprocess_seqid_op()
6067 status = nfs4_seqid_op_checks(cstate, stateid, seqid, stp); in nfs4_preprocess_seqid_op()
6075 static __be32 nfs4_preprocess_confirmed_seqid_op(struct nfsd4_compound_state *cstate, u32 seqid, in nfs4_preprocess_confirmed_seqid_op() argument
6082 status = nfs4_preprocess_seqid_op(cstate, seqid, stateid, in nfs4_preprocess_confirmed_seqid_op()
6097 nfsd4_open_confirm(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_open_confirm() argument
6107 cstate->current_fh.fh_dentry); in nfsd4_open_confirm()
6109 status = fh_verify(rqstp, &cstate->current_fh, S_IFREG, 0); in nfsd4_open_confirm()
6113 status = nfs4_preprocess_seqid_op(cstate, in nfsd4_open_confirm()
6133 nfsd4_bump_seqid(cstate, status); in nfsd4_open_confirm()
6165 struct nfsd4_compound_state *cstate, union nfsd4_op_u *u) in nfsd4_open_downgrade() argument
6173 cstate->current_fh.fh_dentry); in nfsd4_open_downgrade()
6180 status = nfs4_preprocess_confirmed_seqid_op(cstate, od->od_seqid, in nfsd4_open_downgrade()
6203 nfsd4_bump_seqid(cstate, status); in nfsd4_open_downgrade()
6236 nfsd4_close(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_close() argument
6246 cstate->current_fh.fh_dentry); in nfsd4_close()
6248 status = nfs4_preprocess_seqid_op(cstate, close->cl_seqid, in nfsd4_close()
6252 nfsd4_bump_seqid(cstate, status); in nfsd4_close()
6285 nfsd4_delegreturn(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_delegreturn() argument
6295 if ((status = fh_verify(rqstp, &cstate->current_fh, S_IFREG, 0))) in nfsd4_delegreturn()
6298 status = nfsd4_lookup_stateid(cstate, stateid, NFS4_DELEG_STID, &s, nn); in nfsd4_delegreturn()
6302 status = nfsd4_stid_check_stateid_generation(stateid, &dp->dl_stid, nfsd4_has_session(cstate)); in nfsd4_delegreturn()
6625 lookup_or_create_lock_state(struct nfsd4_compound_state *cstate, in lookup_or_create_lock_state() argument
6634 struct inode *inode = d_inode(cstate->current_fh.fh_dentry); in lookup_or_create_lock_state()
6648 if (!cstate->minorversion && in lookup_or_create_lock_state()
6670 nfsd4_lock(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_lock() argument
6699 if ((status = fh_verify(rqstp, &cstate->current_fh, in nfsd4_lock()
6706 if (nfsd4_has_session(cstate)) in nfsd4_lock()
6709 &cstate->session->se_client->cl_clientid, in nfsd4_lock()
6717 status = nfs4_preprocess_confirmed_seqid_op(cstate, in nfsd4_lock()
6729 status = lookup_or_create_lock_state(cstate, open_stp, lock, in nfsd4_lock()
6732 status = nfs4_preprocess_seqid_op(cstate, in nfsd4_lock()
6756 if (nfsd4_has_session(cstate)) in nfsd4_lock()
6768 if (nfsd4_has_session(cstate)) in nfsd4_lock()
6861 if (cstate->replay_owner && in nfsd4_lock()
6862 cstate->replay_owner != &lock_sop->lo_owner && in nfsd4_lock()
6879 nfsd4_bump_seqid(cstate, status); in nfsd4_lock()
6916 nfsd4_lockt(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_lockt() argument
6931 if (!nfsd4_has_session(cstate)) { in nfsd4_lockt()
6932 status = lookup_clientid(&lockt->lt_clientid, cstate, nn, in nfsd4_lockt()
6938 if ((status = fh_verify(rqstp, &cstate->current_fh, S_IFREG, 0))) in nfsd4_lockt()
6963 lo = find_lockowner_str(cstate->clp, &lockt->lt_owner); in nfsd4_lockt()
6974 status = nfsd_test_lock(rqstp, &cstate->current_fh, file_lock); in nfsd4_lockt()
6991 nfsd4_locku(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_locku() argument
7009 status = nfs4_preprocess_seqid_op(cstate, locku->lu_seqid, in nfsd4_locku()
7050 nfsd4_bump_seqid(cstate, status); in nfsd4_locku()
7099 struct nfsd4_compound_state *cstate, in nfsd4_release_lockowner() argument
7117 status = lookup_clientid(clid, cstate, nn, false); in nfsd4_release_lockowner()
7121 clp = cstate->clp; in nfsd4_release_lockowner()
7251 struct nfsd4_compound_state *cstate, in nfs4_check_open_reclaim() argument
7257 status = lookup_clientid(clid, cstate, nn, false); in nfs4_check_open_reclaim()
7261 if (test_bit(NFSD4_CLIENT_RECLAIM_COMPLETE, &cstate->clp->cl_flags)) in nfs4_check_open_reclaim()
7264 if (nfsd4_client_record_check(cstate->clp)) in nfs4_check_open_reclaim()
7470 get_stateid(struct nfsd4_compound_state *cstate, stateid_t *stateid) in get_stateid() argument
7472 if (HAS_CSTATE_FLAG(cstate, CURRENT_STATE_ID_FLAG) && in get_stateid()
7474 memcpy(stateid, &cstate->current_stateid, sizeof(stateid_t)); in get_stateid()
7478 put_stateid(struct nfsd4_compound_state *cstate, stateid_t *stateid) in put_stateid() argument
7480 if (cstate->minorversion) { in put_stateid()
7481 memcpy(&cstate->current_stateid, stateid, sizeof(stateid_t)); in put_stateid()
7482 SET_CSTATE_FLAG(cstate, CURRENT_STATE_ID_FLAG); in put_stateid()
7487 clear_current_stateid(struct nfsd4_compound_state *cstate) in clear_current_stateid() argument
7489 CLEAR_CSTATE_FLAG(cstate, CURRENT_STATE_ID_FLAG); in clear_current_stateid()
7496 nfsd4_set_opendowngradestateid(struct nfsd4_compound_state *cstate, in nfsd4_set_opendowngradestateid() argument
7499 put_stateid(cstate, &u->open_downgrade.od_stateid); in nfsd4_set_opendowngradestateid()
7503 nfsd4_set_openstateid(struct nfsd4_compound_state *cstate, in nfsd4_set_openstateid() argument
7506 put_stateid(cstate, &u->open.op_stateid); in nfsd4_set_openstateid()
7510 nfsd4_set_closestateid(struct nfsd4_compound_state *cstate, in nfsd4_set_closestateid() argument
7513 put_stateid(cstate, &u->close.cl_stateid); in nfsd4_set_closestateid()
7517 nfsd4_set_lockstateid(struct nfsd4_compound_state *cstate, in nfsd4_set_lockstateid() argument
7520 put_stateid(cstate, &u->lock.lk_resp_stateid); in nfsd4_set_lockstateid()
7528 nfsd4_get_opendowngradestateid(struct nfsd4_compound_state *cstate, in nfsd4_get_opendowngradestateid() argument
7531 get_stateid(cstate, &u->open_downgrade.od_stateid); in nfsd4_get_opendowngradestateid()
7535 nfsd4_get_delegreturnstateid(struct nfsd4_compound_state *cstate, in nfsd4_get_delegreturnstateid() argument
7538 get_stateid(cstate, &u->delegreturn.dr_stateid); in nfsd4_get_delegreturnstateid()
7542 nfsd4_get_freestateid(struct nfsd4_compound_state *cstate, in nfsd4_get_freestateid() argument
7545 get_stateid(cstate, &u->free_stateid.fr_stateid); in nfsd4_get_freestateid()
7549 nfsd4_get_setattrstateid(struct nfsd4_compound_state *cstate, in nfsd4_get_setattrstateid() argument
7552 get_stateid(cstate, &u->setattr.sa_stateid); in nfsd4_get_setattrstateid()
7556 nfsd4_get_closestateid(struct nfsd4_compound_state *cstate, in nfsd4_get_closestateid() argument
7559 get_stateid(cstate, &u->close.cl_stateid); in nfsd4_get_closestateid()
7563 nfsd4_get_lockustateid(struct nfsd4_compound_state *cstate, in nfsd4_get_lockustateid() argument
7566 get_stateid(cstate, &u->locku.lu_stateid); in nfsd4_get_lockustateid()
7570 nfsd4_get_readstateid(struct nfsd4_compound_state *cstate, in nfsd4_get_readstateid() argument
7573 get_stateid(cstate, &u->read.rd_stateid); in nfsd4_get_readstateid()
7577 nfsd4_get_writestateid(struct nfsd4_compound_state *cstate, in nfsd4_get_writestateid() argument
7580 get_stateid(cstate, &u->write.wr_stateid); in nfsd4_get_writestateid()