kernel-ark/fs/nfs
Andy Adamson e2c4ab3ce2 nfs41: free slot
Free a slot in the slot table.

Mark the slot as free in the bitmap-based allocation table
by clearing a bit corresponding to the slotid.

Update lowest_free_slotid if freed slotid is lower than that.
Update highest_used_slotid.  In the case the freed slotid
equals the highest_used_slotid, scan downwards for the next
highest used slotid using the optimized fls* functions.

Finally, wake up thread waiting on slot_tbl_waitq for a free slot
to become available.

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
[nfs41: free slot use slotid]
Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
[nfs41: use find_first_zero_bit for nfs4_find_slot]
    While at it, obliterate lowest_free_slotid and fix-up related comments.
    As per review comment 21/85.
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
[nfs41: use __clear_bit for nfs4_free_slot]
    While at it, fix-up function comment.
    Part of review comment 22/85.
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
[nfs41: use find_last_bit in nfs4_free_slot to determine highest used slot.]
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
[nfs41: rpc_sleep_on slot_tbl_waitq must be called under slot_tbl_lock]
    Otherwise there's a race (we've hit) with nfs4_free_slot where
    nfs41_setup_sequence sees a full slot table, unlocks slot_tbl_lock,
    nfs4_free_slots happen concurrently and call rpc_wake_up_next
    where there's nobody to wake up yet, context goes back to
    nfs41_setup_sequence which goes to sleep when the slot table
    is actually empty now and there's no-one to wake it up anymore.
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2009-06-17 10:46:39 -07:00
..
callback_proc.c
callback_xdr.c
callback.c NFS: Start PF_INET6 callback listener only if IPv6 support is available 2009-03-28 16:02:43 -04:00
callback.h NFS: Start PF_INET6 callback listener only if IPv6 support is available 2009-03-28 16:02:43 -04:00
client.c nfs41: introduce nfs4_call_sync 2009-06-17 10:46:28 -07:00
delegation.c NFSv4: Convert delegation->type field to fmode_t 2008-12-23 15:21:53 -05:00
delegation.h NFSv4: Convert delegation->type field to fmode_t 2008-12-23 15:21:53 -05:00
dir.c nfs: Fix NFS v4 client handling of MAY_EXEC in nfs_permission. 2009-05-18 20:11:12 -07:00
direct.c
file.c NFS: Close page_mkwrite() races 2009-05-02 19:42:39 -07:00
fscache-index.c NFS: Add read context retention for FS-Cache to call back with 2009-04-03 16:42:44 +01:00
fscache.c NFS: Store pages from an NFS inode into a local cache 2009-04-03 16:42:45 +01:00
fscache.h NFS: Display local caching state 2009-04-03 16:42:47 +01:00
getroot.c NFS: Fix the type of struct nfs_fattr->mode 2009-03-11 14:10:26 -04:00
idmap.c
inode.c NFS: Use local disk inode cache 2009-04-03 16:42:43 +01:00
internal.h nfs41: introduce nfs4_call_sync 2009-06-17 10:46:28 -07:00
iostat.h NFS: Add some new I/O counters for FS-Cache doing things for NFS 2009-04-03 16:42:43 +01:00
Kconfig nfs41: Add Kconfig symbols for NFSv4.1 2009-06-17 10:46:13 -07:00
Makefile NFS: Define and create server-level objects 2009-04-03 16:42:42 +01:00
mount_clnt.c
namespace.c
nfs2xdr.c NFS: Fix the type of struct nfs_fattr->mode 2009-03-11 14:10:26 -04:00
nfs3acl.c NFSv3: Fix posix ACL code 2009-03-10 20:33:18 -04:00
nfs3proc.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 2009-04-02 21:09:10 -07:00
nfs3xdr.c NFS: Fix the XDR iovec calculation in nfs3_xdr_setaclargs 2009-04-21 07:46:49 -07:00
nfs4_fs.h nfs41: setup_sequence method 2009-06-17 10:46:39 -07:00
nfs4namespace.c NFS: Fix misparsing of nfsv4 fs_locations attribute (take 2) 2009-03-10 20:33:17 -04:00
nfs4proc.c nfs41: free slot 2009-06-17 10:46:39 -07:00
nfs4renewd.c
nfs4state.c nfs41: translate NFS4ERR_MINOR_VERS_MISMATCH to EPROTONOSUPPORT 2009-06-17 10:46:18 -07:00
nfs4xdr.c nfs41: xdr {encode,decode}_sequence 2009-06-17 10:46:36 -07:00
nfsroot.c nfs: fix build error in nfsroot with initconst 2009-05-26 14:51:00 -04:00
pagelist.c NFS: Throttle page dirtying while we're flushing to disk 2009-03-11 14:10:30 -04:00
proc.c NFS: Optimise NFS close() 2009-03-19 15:35:50 -04:00
read.c nfs41: set up seq_res.sr_slotid 2009-06-17 10:46:30 -07:00
super.c nfs41: add mount command option minorversion 2009-06-17 10:46:15 -07:00
symlink.c
sysctl.c
unlink.c nfs41: set up seq_res.sr_slotid 2009-06-17 10:46:30 -07:00
write.c nfs41: set up seq_res.sr_slotid 2009-06-17 10:46:30 -07:00