Lines Matching defs:stateid

79 #define ZERO_STATEID(stateid) (!memcmp((stateid), &zero_stateid, sizeof(stateid_t)))
80 #define ONE_STATEID(stateid) (!memcmp((stateid), &one_stateid, sizeof(stateid_t)))
81 #define CURRENT_STATEID(stateid) (!memcmp((stateid), &currentstateid, sizeof(stateid_t)))
82 #define CLOSE_STATEID(stateid) (!memcmp((stateid), &close_stateid, sizeof(stateid_t)))
108 * the refcount on the open stateid to drop.
407 * st_{access,deny}_bmap field of the stateid, in order to track not
442 /* set share access for a given stateid */
452 /* clear share access for a given stateid */
462 /* test whether a given stateid has access */
471 /* set share deny for a given stateid */
481 /* clear share deny for a given stateid */
491 /* test whether a given stateid is denying specific access */
760 /* ignore lock stateid */
968 * It shouldn't be a problem to reuse an opaque stateid value.
1405 * A stateid that had a deny mode associated with it is being released
1438 /* release all access and file references for a given stateid */
1524 * Put the persistent reference to an already unhashed generic stateid, while
2823 * Note: a lock stateid isn't really the same thing as a lock,
2830 /* XXX: open stateid? */
4803 * that it can forget an admin-revoked stateid.
4808 * to free the stateid.
4836 /* Lock the stateid st_mutex, and deal with races with CLOSE */
4968 * stateid. We can't put the sc_file reference until they are finished.
5068 * Called to check deny when READ with all zero stateid or
5069 * WRITE with all zero or all one stateid
5521 /* Set access bits in stateid */
6035 * Lookup file; if found, lookup stateid and check open request,
6657 /* For lock stateid's, we test the parent open, not the lock: */
6670 check_special_stateids(struct net *net, svc_fh *current_fh, stateid_t *stateid, int flags)
6672 if (ONE_STATEID(stateid) && (flags & RD_STATE))
6681 else /* (flags & RD_STATE) && ZERO_STATEID(stateid) */
6689 * When sessions are used the stateid generation number is ignored
6698 /* If the client sends us a stateid from the future, it's buggy: */
6702 * However, we could see a stateid from the past, even from a
6737 static __be32 nfsd4_validate_stateid(struct nfs4_client *cl, stateid_t *stateid)
6742 if (ZERO_STATEID(stateid) || ONE_STATEID(stateid) ||
6743 CLOSE_STATEID(stateid))
6746 s = find_stateid_locked(cl, stateid);
6749 status = nfsd4_stid_check_stateid_generation(stateid, s, 1);
6765 printk("unknown stateid type %x\n", s->sc_type);
6771 nfsd40_drop_revoked_stid(cl, stateid);
6777 stateid_t *stateid,
6799 if (ZERO_STATEID(stateid) || ONE_STATEID(stateid) ||
6800 CLOSE_STATEID(stateid))
6802 status = set_client(&stateid->si_opaque.so_clid, cstate, nn);
6810 stid = find_stateid_by_type(cstate->clp, stateid, typemask, statusmask);
6818 nfsd40_drop_revoked_stid(cstate->clp, stateid);
6900 * copy stateid. Look up the copy notify stateid from the
6975 * nfs4_preprocess_stateid_op - find and prep stateid for an operation
6978 * @fhp: filehandle associated with requested stateid
6979 * @stateid: stateid (provided by client)
6991 stateid_t *stateid, int flags, struct nfsd_file **nfp,
7002 if (ZERO_STATEID(stateid) || ONE_STATEID(stateid)) {
7006 status = check_special_stateids(net, fhp, stateid,
7011 status = nfsd4_lookup_stateid(cstate, stateid,
7015 status = find_cpntf_state(nn, stateid, &s);
7018 status = nfsd4_stid_check_stateid_generation(stateid, s,
7050 * Test if the stateid is valid
7057 struct nfsd4_test_stateid_id *stateid;
7060 list_for_each_entry(stateid, &test_stateid->ts_stateid_list, ts_id_list)
7061 stateid->ts_id_status =
7062 nfsd4_validate_stateid(cl, &stateid->ts_id_stateid);
7068 nfsd4_free_lock_stateid(stateid_t *stateid, struct nfs4_stid *s)
7077 ret = check_stateid_generation(stateid, &s->sc_stateid, 1);
7101 stateid_t *stateid = &free_stateid->fr_stateid;
7108 s = find_stateid_locked(cl, stateid);
7131 ret = check_stateid_generation(stateid, &s->sc_stateid, 1);
7140 ret = nfsd4_free_lock_stateid(stateid, s);
7157 static __be32 nfs4_seqid_op_checks(struct nfsd4_compound_state *cstate, stateid_t *stateid, u32 seqid, struct nfs4_ol_stateid *stp)
7169 status = check_stateid_generation(stateid, &stp->st_stid.sc_stateid, nfsd4_has_session(cstate));
7181 * @stateid: stateid (provided by client)
7184 * @stpp: return pointer for the stateid found
7187 * Given a stateid+seqid from a client, look up an nfs4_ol_stateid and
7188 * return it in @stpp. On a nfs_ok return, the returned stateid will
7193 stateid_t *stateid,
7202 trace_nfsd_preprocess(seqid, stateid);
7205 status = nfsd4_lookup_stateid(cstate, stateid,
7212 status = nfs4_seqid_op_checks(cstate, stateid, seqid, stp);
7221 stateid_t *stateid, struct nfs4_ol_stateid **stpp, struct nfsd_net *nn)
7227 status = nfs4_preprocess_seqid_op(cstate, seqid, stateid,
7416 /* v4.1+ suggests that we send a special stateid in here, since the
7437 stateid_t *stateid = &dr->dr_stateid;
7445 status = nfsd4_lookup_stateid(cstate, stateid, SC_TYPE_DELEG, 0, &s, nn);
7449 status = nfsd4_stid_check_stateid_generation(stateid, &dp->dl_stid, nfsd4_has_session(cstate));
7453 trace_nfsd_deleg_return(stateid);
7882 /* validate and update open stateid and open seqid */
8056 * If this is a new, never-before-used stateid, and we are
8282 /* Any valid lock stateid should have some sort of access */
8679 get_stateid(struct nfsd4_compound_state *cstate, stateid_t *stateid)
8682 CURRENT_STATEID(stateid))
8683 memcpy(stateid, &cstate->current_stateid, sizeof(stateid_t));
8687 put_stateid(struct nfsd4_compound_state *cstate, stateid_t *stateid)
8690 memcpy(&cstate->current_stateid, stateid, sizeof(stateid_t));