Lines Matching defs:lock

692 /* hash tables for lock and open owners */
748 /* ignore lock stateid */
1086 * is used to manage concurrent access. Testing does not need the lock
1708 * All nfs4 states (open, lock, delegation, layout) held by the server instance
2821 seq_puts(s, ": { type: lock, ");
2827 * Note: a lock stateid isn't really the same thing as a lock,
2829 * may be multiple (or no) lock ranges associated with it.
4765 /* ignore lock owners */
5934 * open or lock state.
6327 /* Check if any lock belonging to this lockowner has any blockers */
6553 * It's possible for a client to try and acquire an already held lock
6561 * indefinitely once the lock does become free.
6677 /* For lock stateid's, we test the parent open, not the lock: */
6723 * non-buggy client. For example, if the client sends a lock
6724 * while some IO is outstanding, the lock may bump si_generation
7502 * we can't properly handle lock requests that go beyond the (2^63 - 1)-th
7509 nfs4_transform_lock_offset(struct file_lock *lock)
7511 if (lock->fl_start < 0)
7512 lock->fl_start = OFFSET_MAX;
7513 if (lock->fl_end < 0)
7514 lock->fl_end = OFFSET_MAX;
7668 * Alloc a lock owner structure.
7677 struct nfsd4_lock *lock)
7681 lo = alloc_stateowner(lockowner_slab, &lock->lk_new_owner, clp);
7687 lo->lo_owner.so_seqid = lock->lk_new_lock_seqid;
7690 ret = find_lockowner_str_locked(clp, &lock->lk_new_owner);
7822 struct nfsd4_lock *lock,
7834 lo = find_lockowner_str(cl, &lock->lk_new_owner);
7836 strhashval = ownerstr_hashval(&lock->lk_new_owner);
7837 lo = alloc_init_lock_stateowner(strhashval, cl, ost, lock);
7844 lock->lk_new_lock_seqid != lo->lo_owner.so_seqid)
7868 struct nfsd4_lock *lock = &u->lock;
7889 (long long) lock->lk_offset,
7890 (long long) lock->lk_length);
7892 if (check_lock_length(lock->lk_offset, lock->lk_length))
7902 if (lock->lk_is_new) {
7905 memcpy(&lock->lk_new_clientid,
7911 lock->lk_new_open_seqid,
7912 &lock->lk_new_open_stateid,
7920 &lock->lk_new_clientid))
7922 status = lookup_or_create_lock_state(cstate, open_stp, lock,
7926 lock->lk_old_lock_seqid,
7927 &lock->lk_old_lock_stateid,
7935 lkflg = setlkflg(lock->lk_type);
7941 if (locks_in_grace(net) && !lock->lk_reclaim)
7944 if (!locks_in_grace(net) && lock->lk_reclaim)
7947 if (lock->lk_reclaim)
7951 switch (lock->lk_type) {
7989 * Most filesystems with their own ->lock operations will block
7990 * the nfsd thread waiting to acquire the lock. That leads to
7992 * for file locks), so don't attempt blocking lock notifications
8012 file_lock->fl_start = lock->lk_offset;
8013 file_lock->fl_end = last_byte_offset(lock->lk_offset, lock->lk_length);
8018 dprintk("NFSD: %s: unable to allocate lock!\n", __func__);
8035 nfs4_inc_and_copy_stateid(&lock->lk_resp_stateid, &lock_stp->st_stid);
8037 if (lock->lk_reclaim)
8044 case -EAGAIN: /* conflock holds conflicting lock */
8046 dprintk("NFSD: nfsd4_lock: conflicting lock found!\n");
8047 nfs4_set_lock_denied(conflock, &lock->lk_denied);
8103 struct nfsd4_lock *lock = &u->lock;
8104 struct nfsd4_lock_denied *deny = &lock->lk_denied;
8114 static __be32 nfsd_test_lock(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file_lock *lock)
8128 lock->c.flc_file = nf->nf_file;
8129 err = nfserrno(vfs_test_lock(nf->nf_file, lock));
8130 lock->c.flc_file = NULL;
8167 dprintk("NFSD: %s: unable to allocate lock!\n", __func__);
8182 dprintk("NFSD: nfs4_lockt: bad lock type!\n");
8253 dprintk("NFSD: %s: unable to allocate lock!\n", __func__);
8309 /* Any valid lock stateid should have some sort of access */
8339 * and any lock state that is owned.
8749 put_stateid(cstate, &u->lock.lk_resp_stateid);