Lines Matching defs:access

407  * st_{access,deny}_bmap field of the stateid, in order to track not
417 * track of access/deny bit combinations; so, e.g., we allow:
433 unsigned int access = 0;
437 access |= i;
439 return access;
442 /* set share access for a given stateid */
444 set_access(u32 access, struct nfs4_ol_stateid *stp)
446 unsigned char mask = 1 << access;
448 WARN_ON_ONCE(access > NFS4_SHARE_ACCESS_BOTH);
452 /* clear share access for a given stateid */
454 clear_access(u32 access, struct nfs4_ol_stateid *stp)
456 unsigned char mask = 1 << access;
458 WARN_ON_ONCE(access > NFS4_SHARE_ACCESS_BOTH);
462 /* test whether a given stateid has access */
464 test_access(u32 access, struct nfs4_ol_stateid *stp)
466 unsigned char mask = 1 << access;
491 /* test whether a given stateid is denying specific access */
500 static int nfs4_access_to_omode(u32 access)
502 switch (access & NFS4_SHARE_ACCESS_BOTH) {
733 * Check if courtesy clients have conflicting access and resolve it if possible
735 * access: is op_share_access if share_access is true.
736 * Check if access mode, op_share_access, would conflict with
738 * access: is op_share_deny if share_access is false.
740 * current access of the file 'fp'.
745 * false - access/deny mode conflict with normal client.
750 struct nfs4_ol_stateid *stp, u32 access, bool share_access)
765 /* check file access against deny mode or vice versa */
767 if (!(access & bmap_to_share_mode(bmap)))
784 __nfs4_file_get_access(struct nfs4_file *fp, u32 access)
788 if (access & NFS4_SHARE_ACCESS_WRITE)
790 if (access & NFS4_SHARE_ACCESS_READ)
795 nfs4_file_get_access(struct nfs4_file *fp, u32 access)
799 /* Does this access mode make sense? */
800 if (access & ~NFS4_SHARE_ACCESS_BOTH)
804 if ((access & fp->fi_share_deny) != 0)
807 __nfs4_file_get_access(fp, access);
849 static void nfs4_file_put_access(struct nfs4_file *fp, u32 access)
851 WARN_ON_ONCE(access & ~NFS4_SHARE_ACCESS_BOTH);
853 if (access & NFS4_SHARE_ACCESS_WRITE)
855 if (access & NFS4_SHARE_ACCESS_READ)
1098 * is used to manage concurrent access. Testing does not need the lock
1438 /* release all access and file references for a given stateid */
2768 unsigned int access, deny;
2778 access = bmap_to_share_mode(ols->st_access_bmap);
2781 seq_printf(s, "access: %s%s, ",
2782 access & NFS4_SHARE_ACCESS_READ ? "r" : "-",
2783 access & NFS4_SHARE_ACCESS_WRITE ? "w" : "-");
2856 seq_printf(s, "access: %s",
4951 * CLOSE replay. We still do need to release any file access that is held by
5485 int access = nfs4_access_to_access(open->op_share_access);
5492 * current access?
5507 /* set access to the file */
5521 /* Set access bits in stateid */
5533 status = nfsd_file_acquire_opened(rqstp, cur_fh, access,
5549 access));
7282 static inline void nfs4_stateid_downgrade_bit(struct nfs4_ol_stateid *stp, u32 access)
7284 if (!test_access(access, stp))
7286 nfs4_file_put_access(stp->st_stid.sc_file, access);
7287 clear_access(access, stp);
7331 dprintk("NFSD: access not a subset of current bitmap: 0x%hhx, input access=%08x\n",
7780 static void get_lock_access(struct nfs4_ol_stateid *lock_stp, u32 access)
7786 if (test_access(access, lock_stp))
7788 __nfs4_file_get_access(fp, access);
7789 set_access(access, lock_stp);
8282 /* Any valid lock stateid should have some sort of access */