- 03 May, 2009 1 commit
-
-
J. Bruce Fields authored
As with the probe, this removes the need for another kthread. Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
- 01 May, 2009 4 commits
-
-
J. Bruce Fields authored
Move this out of a local variable into the nfs4_delegation object in preparation for making this an async rpc call (at which point we'll need any state like this in a common object that's preserved across function calls). Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
J. Bruce Fields authored
There's no point in keeping this field around--it's always zero. (Background: the protocol allows you to tell the client that the file is about to be truncated, as an optimization to save the client from writing back dirty pages that will just be discarded. We don't implement this hint. If we do some day, adding this field back in will be the least of the work involved.) Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
J. Bruce Fields authored
The nfs4_cb_recall struct is used only in nfs4_delegation, so its pointer to the containing delegation is unnecessary--we could just use container_of(). But there's no real reason to have this a separate struct at all--just move these fields to nfs4_delegation. Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
J. Bruce Fields authored
I want to use the name for a struct that actually does represent a single callback. (Actually, I've never been sure it helps to a separate struct for the callback information. Some day maybe those fields could just be dumped into struct nfs4_client. I don't know.) Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
- 29 Apr, 2009 5 commits
-
-
J. Bruce Fields authored
We don't really need a synchronous rpc, and moving to an asynchronous rpc allows us to do without this extra kthread. Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
J. Bruce Fields authored
Lookup the callback cred once and then use it for all subsequent callbacks. Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
J. Bruce Fields authored
The code is a little simpler, and it should be easier to avoid races, if we just do all rpc client creation/destruction from nfsd or laundromat threads and do only the rpc calls themselves asynchronously. The rpc creation doesn't involve any significant waiting (it doesn't call the client, for example), so there's no reason not to do this. Also don't bother destroying the client on failure of the rpc null probe. We may want to retry the probe later anyway. Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
J. Bruce Fields authored
This is just a minor code simplification. Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
J. Bruce Fields authored
We tried to do something overly complicated with the callback rpc timeouts here. And they're wrong--the result is that by the time a single callback times out, it's already too late to tell the client (using the cb_path_down return to RENEW) that the callback is down. Use a much shorter, simpler timeout. Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
- 18 Mar, 2009 6 commits
-
-
J. Bruce Fields authored
Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
J. Bruce Fields authored
The errors returned aren't used. Just return 0 and make them available to a dprintk(). Also, consistently use -ERRNO errors instead of nfs errors. Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu> Reviewed-by:
Benny Halevy <bhalevy@panasas.com>
-
J. Bruce Fields authored
As part of reducing the scope of the client_mutex, and in order to remove the need for mutexes from the callback code (so that callbacks can be done as asynchronous rpc calls), move manipulations of the file_hashtable under the recall_lock. Update the relevant comments while we're here. Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu> Cc: Alexandros Batsakis <batsakis@netapp.com> Reviewed-by:
Benny Halevy <bhalevy@panasas.com>
-
J. Bruce Fields authored
Since free_client() is guaranteed to only be called once, and to only touch the client structure itself (not any common data structures), it has no need for the state lock. Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu> Cc: Alexandros Batsakis <batsakis@netapp.com>
-
Alexandros Batsakis authored
not having the state locked before putting the client/delegation causes a bug. Also removed the comment from the function header about the state being already locked Signed-off-by:
Alexandros Batsakis <batsakis@netapp.com> Signed-off-by:
Benny Halevy <bhalevy@panasas.com> Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
J. Bruce Fields authored
Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
- 07 Jan, 2009 1 commit
-
-
Benny Halevy authored
There's no use for nfs4_cb_null_ops's declaration in fs/nfsd/nfs4callback.c Signed-off-by:
Benny Halevy <bhalevy@panasas.com> Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
- 23 Dec, 2008 2 commits
-
-
Olga Kornievskaia authored
This patch adds server-side support for callbacks other than AUTH_SYS. Signed-off-by:
Olga Kornievskaia <aglo@citi.umich.edu> Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
Olga Kornievskaia authored
The rpc client needs to know the principal that the setclientid was done as, so it can tell gssd who to authenticate to. Signed-off-by:
Olga Kornievskaia <aglo@citi.umich.edu> Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
- 29 Sep, 2008 3 commits
-
-
Benny Halevy authored
since commit ff7d9756 "nfsd: use static memory for callback program and stats" do_probe_callback uses a static callback program (NFS4_CALLBACK) rather than the one set in clp->cl_callback.cb_prog as passed in by the client in setclientid (4.0) or create_session (4.1). This patches introduces rpc_create_args.prognumber that allows overriding program->number when creating rpc_clnt. Signed-off-by:
Benny Halevy <bhalevy@panasas.com> Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
Benny Halevy authored
Now that cb_stats are static (since commit ff7d9756 ) there's no need to clear them. Initially I thought it might make sense to do that every callback probing but since the stats are per-program and they are shared between possibly several client callback instances, zeroing them out seems like the wrong thing to do. Note that that commit also introduced a bug since stats.program is also being cleared in the process and it is not restored after the memset as it used to be. Signed-off-by:
Benny Halevy <bhalevy@panasas.com> Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
Benny Halevy authored
Signed-off-by:
Benny Halevy <bhalevy@panasas.com> Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
- 09 Jul, 2008 1 commit
-
-
Olga Kornievskaia authored
The cl_chatty flag alows us to control whether a given rpc client leaves "server X not responding, timed out" messages in the syslog. Such messages make sense for ordinary nfs clients (where an unresponsive server means applications on the mountpoint are probably hanging), but not for the callback client (which can fail more commonly, with the only result just of disabling some optimizations). Previously cl_chatty was removed, do to lack of users; reinstate it, and use it for the nfsd's callback client. Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
- 18 May, 2008 1 commit
-
-
J. Bruce Fields authored
We're currently dereferencing the client after we drop our reference count to it. Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
- 30 Apr, 2008 1 commit
-
-
Harvey Harrison authored
__FUNCTION__ is gcc-specific, use __func__ Signed-off-by:
Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- 23 Apr, 2008 1 commit
-
-
Olga Kornievskaia authored
There's no need to dynamically allocate this memory, and doing so may create the possibility of races on shutdown of the rpc client. (We've witnessed it only after adding rpcsec_gss support to the server, after which the rpc code can send destroys calls that expect to still be able to access the rpc_stats structure after it has been destroyed.) Such races are in theory possible if the module containing this "static" memory is removed very quickly after an rpc client is destroyed, but we haven't seen that happen. Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
- 01 Feb, 2008 3 commits
-
-
J. Bruce Fields authored
When the callback channel fails, we inform the client of that by returning a cb_path_down error the next time it tries to renew its lease. If we wait most of a lease period before deciding that a callback has failed and that the callback channel is down, then we decrease the chances that the client will find out in time to do anything about it. So, mark the channel down as soon as we recognize that an rpc has failed. However, continue trying to recall delegations anyway, in hopes it will come back up. This will prevent more delegations from being given out, and ensure cb_path_down is returned to renew calls earlier, while still making the best effort to deliver recalls of existing delegations. Also fix a couple comments and remove a dprink that doesn't seem likely to be useful. Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
J. Bruce Fields authored
The whole reason to move this callback-channel probe into a separate thread was because (for now) we don't have an easy way to create the rpc_client asynchronously. But I forgot to move the rpc_create() to the spawned thread. Doh! Fix that. Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
J. Bruce Fields authored
Our callback code doesn't actually handle concurrent attempts to probe the callback channel. Some rethinking of the locking may be required. However, we can also just move the callback probing to this case. Since this is the only time a client is "confirmed" (and since that can only happen once in the lifetime of a client), this ensures we only probe once. Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
- 09 Oct, 2007 3 commits
-
-
J. Bruce Fields authored
It's not enough to take a reference on the delegation object itself; we need to ensure that the rpc_client won't go away just as we're about to make an rpc call. Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
J. Bruce Fields authored
It doesn't make sense to make the callback with credentials that the client made the setclientid with. Instead the spec requires that the callback occur with the credentials the client authenticated *to*. It probably doesn't matter what we use for auth_unix, and some more infrastructure will be needed for auth_gss, so let's just remove the cred lookup for now. Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu> Acked-by:
Neil Brown <neilb@suse.de>
-
J. Bruce Fields authored
We want to allow gss on the callback channel, so people using krb5 can still get the benefits of delegations. But looking up the rpc credential can take some time in that case. And we shouldn't delay the response to setclientid_confirm while we wait. It may be inefficient, but for now the simplest solution is just to spawn a new thread as necessary for the purpose. (Thanks to Adrian Bunk for catching a missing static here.) Signed-off-by:
"J. Bruce Fields" <bfields@citi.umich.edu> Cc: Adrian Bunk <bunk@kernel.org>
-
- 17 Jul, 2007 1 commit
-
-
Benny Halevy authored
enc_stateid_sz should be given in u32 words units, not bytes, so we were overestimating the buffer space needed here. Signed-off-by:
Benny Halevy <bhalevy@panasas.com> Signed-off-by:
"J. Bruce Fields" <bfields@citi.umich.edu> Signed-off-by:
Neil Brown <neilb@suse.de> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- 10 Jul, 2007 2 commits
-
-
Chuck Lever authored
A couple of callers just use a stringified IP address for the rpc client's hostname. Move the logic for constructing this into rpc_create(), so it can be shared. Signed-off-by:
Chuck Lever <chuck.lever@oracle.com> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
Trond Myklebust authored
Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
- 21 May, 2007 1 commit
-
-
Alexey Dobriyan authored
First thing mm.h does is including sched.h solely for can_do_mlock() inline function which has "current" dereference inside. By dealing with can_do_mlock() mm.h can be detached from sched.h which is good. See below, why. This patch a) removes unconditional inclusion of sched.h from mm.h b) makes can_do_mlock() normal function in mm/mlock.c c) exports can_do_mlock() to not break compilation d) adds sched.h inclusions back to files that were getting it indirectly. e) adds less bloated headers to some files (asm/signal.h, jiffies.h) that were getting them indirectly Net result is: a) mm.h users would get less code to open, read, preprocess, parse, ... if they don't need sched.h b) sched.h stops being dependency for significant number of files: on x86_64 allmodconfig touching sched.h results in recompile of 4083 files, after patch it's only 3744 (-8.3%). Cross-compile tested on all arm defconfigs, all mips defconfigs, all powerpc defconfigs, alpha alpha-up arm i386 i386-up i386-defconfig i386-allnoconfig ia64 ia64-up m68k mips parisc parisc-up powerpc powerpc-up s390 s390-up sparc sparc-up sparc64 sparc64-up um-x86_64 x86_64 x86_64-up x86_64-defconfig x86_64-allnoconfig as well as my two usual configs. Signed-off-by:
Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- 01 May, 2007 1 commit
-
-
Chuck Lever authored
The RPC buffer size estimation logic in net/sunrpc/clnt.c always significantly overestimates the requirements for the buffer size. A little instrumentation demonstrated that in fact rpc_malloc was never allocating the buffer from the mempool, but almost always called kmalloc. To compute the size of the RPC buffer more precisely, split p_bufsiz into two fields; one for the argument size, and one for the result size. Then, compute the sum of the exact call and reply header sizes, and split the RPC buffer precisely between the two. That should keep almost all RPC buffers within the 2KiB buffer mempool limit. And, we can finally be rid of RPC_SLACK_SPACE! Signed-off-by:
Chuck Lever <chuck.lever@oracle.com> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
- 16 Feb, 2007 1 commit
-
-
J. Bruce Fields authored
The server name is expected to be a null-terminated string, so we can't pass in the raw client identifier. What's more, the client identifier is just a binary, not necessarily printable, blob. Let's just use the ip address instead. The server name appears to exist just to help debugging by making some printk's more informative. Note that the string is copies into the rpc client structure, so the pointer to the local variable does not outlive the function call. Signed-off-by:
"J. Bruce Fields" <bfields@citi.umich.edu> Signed-off-by:
Neil Brown <neilb@suse.de> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- 20 Oct, 2006 2 commits
-
-
Al Viro authored
Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk> Acked-by:
Trond Myklebust <trond.myklebust@fys.uio.no> Acked-by:
Neil Brown <neilb@suse.de> Signed-off-by:
Andrew Morton <akpm@osdl.org> Signed-off-by:
Linus Torvalds <torvalds@osdl.org>
-
Al Viro authored
Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk> Acked-by:
Trond Myklebust <trond.myklebust@fys.uio.no> Acked-by:
Neil Brown <neilb@suse.de> Signed-off-by:
Andrew Morton <akpm@osdl.org> Signed-off-by:
Linus Torvalds <torvalds@osdl.org>
-