summaryrefslogtreecommitdiffstats
path: root/fs/lockd/clntproc.c
Commit message (Collapse)AuthorAgeFilesLines
* LOCKD: Teach lockd to use the new rpc_peeraddr() APIChuck Lever2006-09-221-5/+5
| | | | | | | | | | | | Hide the details of how the RPC client stores remote peer addresses from the Network Lock Manager. Test plan: Destructive testing (unplugging the network temporarily). Connectathon with UDP and TCP. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NLM,NFSv4: Wait on local locks before we put RPC calls on the wireTrond Myklebust2006-07-051-1/+7
| | | | | | | Use FL_ACCESS flag to test and/or wait for local locks before we try requesting a lock from the server Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NLM,NFSv4: Don't put UNLOCK requests on the wire unless we hold a lockTrond Myklebust2006-07-051-8/+10
| | | | | | | | Use the new behaviour of {flock,posix}_file_lock(F_UNLCK) to determine if we held a lock, and only send the RPC request to the server if this was the case. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* Remove obsolete #include <linux/config.h>Jörn Engel2006-06-301-1/+0
| | | | | Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
* NLM: Fix reclaim racesTrond Myklebust2006-06-091-1/+13
| | | | | | | | | Currently it is possible for a task to remove its locks at the same time as the NLM recovery thread is trying to recover them. This quickly leads to an Oops. Protect the locks using an rw semaphore while they are being recovered. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* lockd: Add helper for *_RES callbacksTrond Myklebust2006-03-201-7/+20
| | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NLM: Add nlmclnt_release_callTrond Myklebust2006-03-201-121/+74
| | | | | | Add a helper function to simplify the freeing of NLM client requests. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NLM: Fix nlmclnt_test to not copy private part of locksTrond Myklebust2006-03-201-1/+3
| | | | | | | The struct file_lock does not carry a properly initialised lock, so don't copy it as if it were. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NLM: Simplify client locksTrond Myklebust2006-03-201-23/+16
| | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NLM: nlmclnt_cancel_callback should accept NLM_LCK_DENIED errorsTrond Myklebust2006-03-201-0/+1
| | | | | | | NLM_LCK_DENIED is a valid error return for an NLM_CANCEL call by the client. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* lockd: Fix Oopses due to list manipulation errors.Trond Myklebust2006-03-201-9/+6
| | | | | | | | The patch "stop abusing file_lock_list introduces a couple of bugs since the locks may be copied and need to be removed from the lists when they are destroyed. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* lockd: stop abusing file_lock_listChristoph Hellwig2006-03-201-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently lockd directly access the file_lock_list from fs/locks.c. It does so to mark locks granted or reclaimable. This is very suboptimal, because a) lockd needs to poke into locks.c internals, and b) it needs to iterate over all locks in the system for marking locks granted or reclaimable. This patch adds lists for granted and reclaimable locks to the nlm_host structure instead, and adds locks to those. nlmclnt_lock: now adds the lock to h_granted instead of setting the NFS_LCK_GRANTED, still O(1) nlmclnt_mark_reclaim: goes away completely, replaced by a list_splice_init. Complexity reduced from O(locks in the system) to O(1) reclaimer: iterates over h_reclaim now, complexity reduced from O(locks in the system) to O(locks per nlm_host) Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* lockd: Clean up of the server-side GRANTED codeTrond Myklebust2006-03-201-43/+0
| | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* lockd: Don't expose the process pid to the NLM serverTrond Myklebust2006-03-201-2/+5
| | | | | | Instead we use the nlm_lockowner->pid. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NLM: nlm_alloc_call should not immediately fail on signalTrond Myklebust2006-03-201-4/+5
| | | | | | | | Currently, nlm_alloc_call tests for a signal before it even tries to allocate memory. Fix it so that it tries at least once. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* [PATCH] NLM: Ensure we do not Oops in the case of an unlockTrond Myklebust2006-03-141-2/+7
| | | | | | | | | | | | In theory, NLM specs assure us that the server will only reply LCK_GRANTED or LCK_DENIED_GRACE_PERIOD to our NLM_UNLOCK request. In practice, we should not assume this to be the case, and the code will currently Oops if we do. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* NLM: Ensure that nlmclnt_cancel_callback() doesn't loop foreverTrond Myklebust2006-02-011-0/+4
| | | | | | | | | | | | If the server returns NLM_LCK_DENIED_NOLOCKS, we currently retry the entire NLM_CANCEL request. This may end up looping forever unless the server changes its mind (why would it do that, though?). Ensure that we limit the number of retries (to 3). See bug# 5957 in bugzilla.kernel.org. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NLM: Fix arguments to NLM_CANCEL callTrond Myklebust2006-02-011-3/+4
| | | | | | | | | | | The OpenGroup docs state that the arguments "block", "exclusive" and "alock" must exactly match the arguments for the lock call that we are trying to cancel. Currently, "block" is always set to false, which is wrong. See bug# 5956 on bugzilla.kernel.org. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* SUNRPC: get rid of cl_chattyChuck Lever2006-01-061-2/+1
| | | | | | | | | | | | Clean up: Every ULP that uses the in-kernel RPC client, except the NLM client, sets cl_chatty. There's no reason why NLM shouldn't set it, so just get rid of cl_chatty and always be verbose. Test-plan: Compile with CONFIG_NFS enabled. Signed-off-by: Chuck Lever <cel@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* RPC: Clean up RPC task structureTrond Myklebust2006-01-061-17/+21
| | | | | | | | | | Shrink the RPC task structure. Instead of storing separate pointers for task->tk_exit and task->tk_release, put them in a structure. Also pass the user data pointer as a parameter instead of passing it via task->tk_calldata. This enables us to nest callbacks. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* [PATCH] kfree cleanup: fsJesper Juhl2005-11-071-2/+1
| | | | | | | | | | This is the fs/ part of the big kfree cleanup patch. Remove pointless checks for NULL prior to calling kfree() in fs/. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] fs: fix-up schedule_timeout() usageNishanth Aravamudan2005-09-101-2/+1
| | | | | | | | | | | Use schedule_timeout_{,un}interruptible() instead of set_current_state()/schedule_timeout() to reduce kernel size. Also use helper functions to convert between human time units and jiffies rather than constant HZ division to avoid rounding errors. Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Cleanup patch for process freezingChristoph Lameter2005-06-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Establish a simple API for process freezing defined in linux/include/sched.h: frozen(process) Check for frozen process freezing(process) Check if a process is being frozen freeze(process) Tell a process to freeze (go to refrigerator) thaw_process(process) Restart process frozen_process(process) Process is frozen now 2. Remove all references to PF_FREEZE and PF_FROZEN from all kernel sources except sched.h 3. Fix numerous locations where try_to_freeze is manually done by a driver 4. Remove the argument that is no longer necessary from two function calls. 5. Some whitespace cleanup 6. Clear potential race in refrigerator (provides an open window of PF_FREEZE cleared before setting PF_FROZEN, recalc_sigpending does not check PF_FROZEN). This patch does not address the problem of freeze_processes() violating the rule that a task may only modify its own flags by setting PF_FREEZE. This is not clean in an SMP environment. freeze(process) is therefore not SMP safe! Signed-off-by: Christoph Lameter <christoph@lameter.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] NLM: fix a client-side race on blocking locks.Trond Myklebust2005-06-221-8/+32
| | | | | | | | | If the lock blocks, the server may send us a GRANTED message that races with the reply to our LOCK request. Make sure that we catch the GRANTED by queueing up our request on the nlm_blocked list before we send off the first LOCK rpc call. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* Linux-2.6.12-rc2v2.6.12-rc2Linus Torvalds2005-04-161-0/+820
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!