summaryrefslogtreecommitdiffstats
path: root/include/linux/lockd
Commit message (Collapse)AuthorAgeFilesLines
* NLM/lockd: remove b_doneJ. Bruce Fields2006-08-031-1/+0
| | | | | | | | We never actually set the b_done field any more; it's always zero. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> (cherry picked from af8412d4283ef91356e65e0ed9b025b376aebded commit)
* Merge branch 'master' of /home/trondmy/kernel/linux-2.6/Trond Myklebust2006-06-202-2/+0
|\ | | | | | | | | | | | | | | Conflicts: include/linux/nfs_fs.h Fixed up conflict with kernel header updates.
| * Don't include linux/config.h from anywhere else in include/David Woodhouse2006-04-262-2/+0
| | | | | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | NLM: Fix reclaim racesTrond Myklebust2006-06-091-0/+1
| | | | | | | | | | | | | | | | | | 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>
* | NLM: sem to mutex conversionTrond Myklebust2006-06-091-1/+1
| | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* | locks.c: add the fl_owner to nlm_compare_locksMarc Eshel2006-06-091-0/+1
|/ | | | | | | | | | Add the fl_owner to NLM compare locks. Since two different client can present the same pid to the server it is not enough to distinguish locks from different clients. The fl_owner field is a pointer to the struct nlm_host which is unique for each client. Signed-off-by: Marc Eshel <eshel@almaden.ibm.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* LOCKD: Make nlmsvc_traverse_shares return voidJ. Bruce Fields2006-03-201-1/+1
| | | | | | | The nlmsvc_traverse_shares return value is always zero, hence useless. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* LOCKD: nlmsvc_traverse_blocks return is unusedJ. Bruce Fields2006-03-201-1/+1
| | | | | | | Note that we never return non-zero. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* lockd: Add helper for *_RES callbacksTrond Myklebust2006-03-201-0/+1
| | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NLM: Add nlmclnt_release_callTrond Myklebust2006-03-201-4/+6
| | | | | | Add a helper function to simplify the freeing of NLM client requests. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NLM: Simplify client locksTrond Myklebust2006-03-201-4/+3
| | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* lockd: stop abusing file_lock_listChristoph Hellwig2006-03-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-2/+0
| | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* lockd: Add refcounting to struct nlm_blockTrond Myklebust2006-03-201-1/+2
| | | | | | | Otherwise, the block may disappear from underneath us when in nlmsvc_retry_blocked. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* lockd: Don't expose the process pid to the NLM serverTrond Myklebust2006-03-201-0/+1
| | | | | | Instead we use the nlm_lockowner->pid. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* [PATCH] NLM: Fix the NLM_GRANTED callback checksTrond Myklebust2006-02-141-3/+3
| | | | | | | | | | | | | | | | | | | | If 2 threads attached to the same process are blocking on different locks on different files (maybe even on different servers) but have the same lock arguments (i.e. same offset+length - actually quite common, since most processes try to lock the entire file) then the first GRANTED call that wakes one up will also wake the other. Currently when the NLM_GRANTED callback comes in, lockd walks the list of blocked locks in search of a match to the lock that the NLM server has granted. Although it checks the lock pid, start and end, it fails to check the filehandle and the server address. By checking the filehandle and server IP address, we ensure that this only happens if the locks truly are referencing the same file. 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/+1
| | | | | | | | | | | | 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-1/+0
| | | | | | | | | | | 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>
* RPC: Clean up RPC task structureTrond Myklebust2006-01-061-1/+1
| | | | | | | | | | 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] NLM: fix a client-side race on blocking locks.Trond Myklebust2005-06-221-1/+6
| | | | | | | | | 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-168-0/+605
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!
OpenPOWER on IntegriCloud