• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/fs/nfsd/

Lines Matching defs:open

152 /* hash table for (open)nfs4_stateid */
320 * close_lru holds (open) stateowner queue ordered by nfs4_stateowner.so_time
413 test_share(struct nfs4_stateid *stp, struct nfsd4_open *open) {
418 if ((access & open->op_share_deny) || (deny & open->op_share_access))
1915 alloc_init_open_stateowner(unsigned int strhashval, struct nfs4_client *clp, struct nfsd4_open *open) {
1920 if (!(sop = alloc_stateowner(&open->op_owner)))
1936 sop->so_seqid = open->op_seqid;
1946 init_stateid(struct nfs4_stateid *stp, struct nfs4_file *fp, struct nfsd4_open *open) {
1947 struct nfs4_stateowner *sop = open->op_stateowner;
1966 __set_bit(open->op_share_access & ~NFS4_SHARE_WANT_MASK,
1968 __set_bit(open->op_share_deny, &stp->st_deny_bmap);
1991 find_openstateowner_str(unsigned int hashval, struct nfsd4_open *open)
1996 if (same_owner_str(so, &open->op_owner, &open->op_clientid))
2198 struct nfsd4_open *open)
2200 clientid_t *clientid = &open->op_clientid;
2205 if (!check_name(open->op_owner))
2208 if (STALE_CLIENTID(&open->op_clientid))
2211 strhashval = ownerstr_hashval(clientid->cl_id, open->op_owner);
2212 sop = find_openstateowner_str(strhashval, open);
2213 open->op_stateowner = sop;
2221 /* When sessions are used, skip open sequenceid processing */
2228 open->op_stateowner = NULL;
2231 if (open->op_seqid == sop->so_seqid - 1) {
2243 if (open->op_seqid != sop->so_seqid)
2246 if (open->op_stateowner == NULL) {
2247 sop = alloc_init_open_stateowner(strhashval, clp, open);
2250 open->op_stateowner = sop;
2286 nfs4_check_deleg(struct nfs4_file *fp, struct nfsd4_open *open,
2292 *dp = find_delegation_file(fp, &open->op_delegate_stateid);
2295 flags = share_access_to_flags(open->op_share_access);
2300 if (open->op_claim_type != NFS4_OPEN_CLAIM_DELEGATE_CUR)
2304 open->op_stateowner->so_confirmed = 1;
2309 nfs4_check_open(struct nfs4_file *fp, struct nfsd4_open *open, struct nfs4_stateid **stpp)
2313 struct nfs4_stateowner *sop = open->op_stateowner;
2319 /* remember if we have seen this open owner */
2323 if (!test_share(local, open))
2371 struct nfsd4_open *open)
2380 status = nfs4_get_vfs_file(rqstp, fp, cur_fh, open->op_share_access);
2391 struct nfsd4_open *open)
2397 if (!open->op_truncate)
2399 if (!(open->op_share_access & NFS4_SHARE_ACCESS_WRITE))
2405 nfs4_upgrade_open(struct svc_rqst *rqstp, struct nfs4_file *fp, struct svc_fh *cur_fh, struct nfs4_stateid *stp, struct nfsd4_open *open)
2407 u32 op_share_access = open->op_share_access & ~NFS4_SHARE_WANT_MASK;
2417 status = nfsd4_truncate(rqstp, cur_fh, open);
2425 /* remember the open */
2427 __set_bit(open->op_share_deny, &stp->st_deny_bmap);
2434 nfs4_set_claim_prev(struct nfsd4_open *open)
2436 open->op_stateowner->so_confirmed = 1;
2437 open->op_stateowner->so_client->cl_firststate = 1;
2444 nfs4_open_delegation(struct svc_fh *fh, struct nfsd4_open *open, struct nfs4_stateid *stp)
2453 open->op_recall = 0;
2454 switch (open->op_claim_type) {
2457 open->op_recall = 1;
2458 flag = open->op_delegate_type;
2469 if (open->op_share_access & NFS4_SHARE_ACCESS_WRITE)
2503 memcpy(&open->op_delegate_stateid, &dp->dl_stateid, sizeof(dp->dl_stateid));
2508 if (open->op_claim_type == NFS4_OPEN_CLAIM_PREVIOUS
2510 && open->op_delegate_type != NFS4_OPEN_DELEGATE_NONE)
2512 open->op_delegate_type = flag;
2519 nfsd4_process_open2(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_open *open)
2529 if (!access_valid(open->op_share_access, resp->cstate.minorversion)
2530 || !deny_valid(open->op_share_deny))
2533 * Lookup file; if found, lookup stateid and check open request,
2539 if ((status = nfs4_check_open(fp, open, &stp)))
2541 status = nfs4_check_deleg(fp, open, &dp);
2546 if (open->op_claim_type == NFS4_OPEN_CLAIM_DELEGATE_CUR)
2560 status = nfs4_upgrade_open(rqstp, fp, current_fh, stp, open);
2565 status = nfs4_new_open(rqstp, &stp, fp, current_fh, open);
2568 init_stateid(stp, fp, open);
2569 status = nfsd4_truncate(rqstp, current_fh, open);
2577 memcpy(&open->op_stateid, &stp->st_stateid, sizeof(stateid_t));
2580 open->op_stateowner->so_confirmed = 1;
2586 nfs4_open_delegation(current_fh, open, stp);
2595 if (status == 0 && open->op_claim_type == NFS4_OPEN_CLAIM_PREVIOUS)
2596 nfs4_set_claim_prev(open);
2598 * To finish the open response, we just need to set the rflags.
2600 open->op_rflags = NFS4_OPEN_RESULT_LOCKTYPE_POSIX;
2601 if (!open->op_stateowner->so_confirmed &&
2603 open->op_rflags |= NFS4_OPEN_RESULT_CONFIRM;
2726 dprintk("NFSD: purging unused open stateowner (so_id %d)\n",
2800 /* For lock stateid's, we test the parent open, not the lock: */
2853 * client sends an open and some IO at the same time, the open
2856 * file an open will affect. So it could avoid that situation
2857 * only by serializing all opens and IO from the same open
2917 } else { /* open or lock stateid */
3018 /* stp is the open stateid */
3542 * Use open owner and open stateid to create lock owner and
3552 /* validate and update open stateid and open seqid */
3673 * so we do a temporary open here just to get an open file to pass to
4066 * Since the lifetime of a delegation isn't limited to that of an open, a