summaryrefslogtreecommitdiffstats
path: root/net/sunrpc
Commit message (Collapse)AuthorAgeFilesLines
* [PATCH] knfsd: SUNRPC: fix up svc_create_socket() to take a sockaddr struct ↵Chuck Lever2007-02-121-8/+8
| | | | | | | | | | | | | + length Replace existing svc_create_socket() API to allow callers to pass addresses larger than a sockaddr_in. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net> 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>
* [PATCH] knfsd: SUNRPC: support IPv6 addresses in RPC server's UDP receive pathChuck Lever2007-02-121-10/+43
| | | | | | | | | | | Add support for IPv6 addresses in the RPC server's UDP receive path. [akpm@linux-foundation.org: cleanups] Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net> 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>
* [PATCH] knfsd: SUNRPC: Support IPv6 addresses in svc_tcp_acceptakpm@linux-foundation.org2007-02-121-9/+7
| | | | | | | | | | Modify svc_tcp_accept to support connecting on IPv6 sockets. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net> 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>
* [PATCH] knfsd: SUNRPC: add a "generic" function to see if the peer uses a ↵Chuck Lever2007-02-121-3/+18
| | | | | | | | | | | | | | secure port The only reason svcsock.c looks at a sockaddr's port is to check whether the remote peer is connecting from a privileged port. Refactor this check to hide processing that is specific to address format. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net> 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>
* [PATCH] knfsd: SUNRPC: teach svc_sendto() to deal with IPv6 addressesChuck Lever2007-02-121-17/+48
| | | | | | | | | | | CMSG_DATA comes in different sizes, depending on address family. [akpm@linux-foundation.org: remove unneeded do/while (0)] Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net> 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>
* [PATCH] knfsd: SUNRPC: Make rq_daddr field address-version independentChuck Lever2007-02-121-2/+2
| | | | | | | | | | The rq_daddr field must support larger addresses. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net> 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>
* [PATCH] knfsd: SUNRPC: Provide room in svc_rqst for larger addressesChuck Lever2007-02-122-8/+14
| | | | | | | | | | | | | | Expand the rq_addr field to allow it to contain larger addresses. Specifically, we replace a 'sockaddr_in' with a 'sockaddr_storage', then everywhere the 'sockaddr_in' was referenced, we use instead an accessor function (svc_addr_in) which safely casts the _storage to _in. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net> 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>
* [PATCH] knfsd: SUNRPC: Use sockaddr_storage to store address in svc_deferred_reqChuck Lever2007-02-121-2/+4
| | | | | | | | | | | Sockaddr_storage will allow us to store arbitrary socket addresses in the svc_deferred_req struct. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net> 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>
* [PATCH] knfsd: SUNRPC: Add a function to format the address in an svc_rqst ↵Chuck Lever2007-02-121-19/+57
| | | | | | | | | | | | | | | | | for printing There are loads of places where the RPC server assumes that the rq_addr fields contains an IPv4 address. Top among these are error and debugging messages that display the server's IP address. Let's refactor the address printing into a separate function that's smart enough to figure out the difference between IPv4 and IPv6 addresses. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net> 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>
* [PATCH] knfsd: SUNRPC: Don't set msg_name and msg_namelen when calling ↵Chuck Lever2007-02-121-15/+7
| | | | | | | | | | | | sock_recvmsg Clean-up: msg_name and msg_namelen are not used by sock_recvmsg, so don't bother to set them in svc_recvfrom. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> 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>
* [PATCH] knfsd: SUNRPC: Cache remote peer's address in svc_sockChuck Lever2007-02-121-6/+8
| | | | | | | | | | | The remote peer's address won't change after the socket has been accepted. We don't need to call ->getname on every incoming request. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net> 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>
* [PATCH] knfsd: SUNRPC: aplit svc_sock_enqueue out of svc_setup_socketNeilBrown2007-02-121-5/+7
| | | | | | | | | | | | | Rather than calling svc_sock_enqueue at the end of svc_setup_socket, we now call it (via svc_sock_recieved) after calling svc_setup_socket at each call site. We do this because a subsequent patch will insert some code between the two calls at one call site. 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>
* [PATCH] knfsd: SUNRPC: allow creating an RPC service without registering ↵Chuck Lever2007-02-121-2/+4
| | | | | | | | | | | | | | | | | with portmapper Sometimes we need to create an RPC service but not register it with the local portmapper. NFSv4 delegation callback, for example. Change the svc_makesock() API to allow optionally creating temporary or permanent sockets, optionally registering with the local portmapper, and make it return the ephemeral port of the new socket. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net> 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>
* [PATCH] knfsd: SUNRPC: update internal API: separate pmap register and temp ↵Chuck Lever2007-02-121-20/+27
| | | | | | | | | | | | | | | | sockets Currently in the RPC server, registering with the local portmapper and creating "permanent" sockets are tied together. Expand the internal APIs to allow these two socket characteristics to be separately specified. This will be externalized in the next patch. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net> 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>
* [NET] SUNRPC: Fix whitespace errors.YOSHIFUJI Hideaki2007-02-1020-150/+150
| | | | | Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [PATCH] knfsd: fix a race in closing NFSd connectionsNeilBrown2007-02-092-16/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you lose this race, it can iput a socket inode twice and you get a BUG in fs/inode.c When I added the option for user-space to close a socket, I added some cruft to svc_delete_socket so that I could call that function when closing a socket per user-space request. This was the wrong thing to do. I should have just set SK_CLOSE and let normal mechanisms do the work. Not only wrong, but buggy. The locking is all wrong and it openned up a race where-by a socket could be closed twice. So this patch: Introduces svc_close_socket which sets SK_CLOSE then either leave the close up to a thread, or calls svc_delete_socket if it can get SK_BUSY. Adds a bias to sk_busy which is removed when SK_DEAD is set, This avoid races around shutting down the socket. Changes several 'spin_lock' to 'spin_lock_bh' where the _bh was missing. Bugzilla-url: http://bugzilla.kernel.org/show_bug.cgi?id=7916 Signed-off-by: Neil Brown <neilb@suse.de> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [PATCH] knfsd: ratelimit some nfsd messages that are triggered by external ↵NeilBrown2007-01-302-21/+24
| | | | | | | | | | | | | | events Also remove {NFSD,RPC}_PARANOIA as having the defines doesn't really add anything. The printks covered by RPC_PARANOIA were triggered by badly formatted packets and so should be ratelimited. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [PATCH] knfsd: fix an NFSD bug with full sized, non-page-aligned readsNeilBrown2007-01-261-0/+2
| | | | | | | | | | | | | | | | | | NFSd assumes that largest number of pages that will be needed for a request+response is 2+N where N pages is the size of the largest permitted read/write request. The '2' are 1 for the non-data part of the request, and 1 for the non-data part of the reply. However, when a read request is not page-aligned, and we choose to use ->sendfile to send it directly from the page cache, we may need N+1 pages to hold the whole reply. This can overflow and array and cause an Oops. This patch increases size of the array for holding pages by one and makes sure that entry is NULL when it is not in use. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [PATCH] knfsd: fix setting of ACL server versionsNeilBrown2007-01-261-1/+2
| | | | | | | | | | | | Due to silly typos, if the nfs versions are explicitly set, no NFSACL versions get enabled. Also improve an error message that would have made this bug a little easier to find. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [PATCH] NFS: Fix Oops in rpc_call_sync()Trond Myklebust2007-01-242-6/+5
| | | | | | | | Fix the Oops in http://bugzilla.linux-nfs.org/show_bug.cgi?id=138 We shouldn't be calling rpc_release_task() for tasks that are not active. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [PATCH] gss_spkm3: fix error handling in module initAkinobu Mita2006-12-221-1/+1
| | | | | | | | | | | | Return error and prevent from loading module when gss_mech_register() failed. Cc: Andy Adamson <andros@citi.umich.edu> Cc: J. Bruce Fields <bfields@citi.umich.edu> Acked-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] knfsd: Don't ignore kstrdup failure in rpc cachesNeilBrown2006-12-131-0/+4
| | | | | | Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] knfsd: svcrpc: remove another silent drop from deferral codeJ.Bruce Fields2006-12-131-11/+9
| | | | | | | | | | | There's no point deferring something just to immediately fail the deferral, especially now that we can do something more useful in the failure case by returning an error. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] knfsd: nfsd: don't drop silently on upcall deferralJ.Bruce Fields2006-12-133-5/+9
| | | | | | | | | | | | | | | | | | | | | | | To avoid tying up server threads when nfsd makes an upcall (to mountd, to get export options, to idmapd, for nfsv4 name<->id mapping, etc.), we temporarily "drop" the request and save enough information so that we can revisit it later. Certain failures during the deferral process can cause us to really drop the request and never revisit it. This is often less than ideal, and is unacceptable in the NFSv4 case--rfc 3530 forbids the server from dropping a request without also closing the connection. As a first step, we modify the deferral code to return -ETIMEDOUT (which is translated to nfserr_jukebox in the v3 and v4 cases, and remains a drop in the v2 case). Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] knfsd: svcrpc: fix gss krb5i memory leakJ.Bruce Fields2006-12-131-4/+5
| | | | | | | | | | | | | | The memory leak here is embarassingly obvious. This fixes a problem that causes the kernel to leak a small amount of memory every time it receives a integrity-protected request. Thanks to Aim Le Rouzic for the bug report. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Fix numerous kcalloc() calls, convert to kzalloc()Robert P. J. Day2006-12-131-1/+1
| | | | | | | | | | | | | | | | | | | All kcalloc() calls of the form "kcalloc(1,...)" are converted to the equivalent kzalloc() calls, and a few kcalloc() calls with the incorrect ordering of the first two arguments are fixed. Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Cc: Jeff Garzik <jeff@garzik.org> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Dominik Brodowski <linux@dominikbrodowski.net> Cc: Adam Belay <ambx1@neo.rr.com> Cc: James Bottomley <James.Bottomley@steeleye.com> Cc: Greg KH <greg@kroah.com> Cc: Mark Fasheh <mark.fasheh@oracle.com> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] struct path: convert sunrpcJosef Sipek2006-12-083-10/+10
| | | | | | Signed-off-by: Josef Sipek <jsipek@fsl.cs.sunysb.edu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Merge branch 'master' of /home/trondmy/kernel/linux-2.6/ into merge_linusTrond Myklebust2006-12-075-6/+70
|\
| * [PATCH] lockdep: name some old style locksPeter Zijlstra2006-12-071-1/+2
| | | | | | | | | | | | | | | | | | Name some of the remaning 'old_style_spin_init' locks Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * [PATCH] lockdep: annotate nfs/nfsd in-kernel socketsPeter Zijlstra2006-12-072-0/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stick NFS sockets in their own class to avoid some lockdep warnings. NFS sockets are never exposed to user-space, and will hence not trigger certain code paths that would otherwise pose deadlock scenarios. [akpm@osdl.org: cleanups] Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Steven Dickson <SteveD@redhat.com> Acked-by: Ingo Molnar <mingo@elte.hu> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Acked-by: Neil Brown <neilb@suse.de> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@osdl.org> [ Fixed patch corruption by quilt, pointed out by Peter Zijlstra ] Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * [PATCH] Add include/linux/freezer.h and move definitions from sched.hNigel Cunningham2006-12-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Move process freezing functions from include/linux/sched.h to freezer.h, so that modifications to the freezer or the kernel configuration don't require recompiling just about everything. [akpm@osdl.org: fix ueagle driver] Signed-off-by: Nigel Cunningham <nigel@suspend2.net> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * [PATCH] slab: remove kmem_cache_tChristoph Lameter2006-12-072-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace all uses of kmem_cache_t with struct kmem_cache. The patch was generated using the following script: #!/bin/sh # # Replace one string by another in all the kernel sources. # set -e for file in `find * -name "*.c" -o -name "*.h"|xargs grep -l $1`; do quilt add $file sed -e "1,\$s/$1/$2/g" $file >/tmp/$$ mv /tmp/$$ $file quilt refresh done The script was run like this sh replace kmem_cache_t "struct kmem_cache" Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * [PATCH] slab: remove SLAB_KERNELChristoph Lameter2006-12-071-1/+1
| | | | | | | | | | | | | | | | SLAB_KERNEL is an alias of GFP_KERNEL. Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | Merge branch 'master' of /home/trondmy/kernel/linux-2.6/ into merge_linusTrond Myklebust2006-12-075-24/+29
|\ \ | |/ | | | | | | | | | | | | Conflicts: include/linux/sunrpc/xprt.h net/sunrpc/xprtsock.c Fix up conflicts with the workqueue changes.
| * Merge branch 'master' of ↵David Howells2006-12-057-20/+14
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 Conflicts: drivers/infiniband/core/iwcm.c drivers/net/chelsio/cxgb2.c drivers/net/wireless/bcm43xx/bcm43xx_main.c drivers/net/wireless/prism54/islpci_eth.c drivers/usb/core/hub.h drivers/usb/input/hid-core.c net/core/netpoll.c Fix up merge failures with Linus's head and fix new compilation failures. Signed-Off-By: David Howells <dhowells@redhat.com>
| * | WorkStruct: Pass the work_struct pointer instead of context dataDavid Howells2006-11-225-21/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass the work_struct pointer to the work function rather than context data. The work function can use container_of() to work out the data. For the cases where the container of the work_struct may go away the moment the pending bit is cleared, it is made possible to defer the release of the structure by deferring the clearing of the pending bit. To make this work, an extra flag is introduced into the management side of the work_struct. This governs auto-release of the structure upon execution. Ordinarily, the work queue executor would release the work_struct for further scheduling or deallocation by clearing the pending bit prior to jumping to the work function. This means that, unless the driver makes some guarantee itself that the work_struct won't go away, the work function may not access anything else in the work_struct or its container lest they be deallocated.. This is a problem if the auxiliary data is taken away (as done by the last patch). However, if the pending bit is *not* cleared before jumping to the work function, then the work function *may* access the work_struct and its container with no problems. But then the work function must itself release the work_struct by calling work_release(). In most cases, automatic release is fine, so this is the default. Special initiators exist for the non-auto-release case (ending in _NAR). Signed-Off-By: David Howells <dhowells@redhat.com>
| * | WorkStruct: Separate delayable and non-delayable events.David Howells2006-11-223-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Separate delayable work items from non-delayable work items be splitting them into a separate structure (delayed_work), which incorporates a work_struct and the timer_list removed from work_struct. The work_struct struct is huge, and this limits it's usefulness. On a 64-bit architecture it's nearly 100 bytes in size. This reduces that by half for the non-delayable type of event. Signed-Off-By: David Howells <dhowells@redhat.com>
* | | SUNRPC: Remove pprintk() from net/sunrpc/xprt.cChuck Lever2006-12-061-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | These appear to be deprecated. Removing them also gets rid of some sparse noise. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* | | SUNRPC: relocate the creation of socket-specific tunablesChuck Lever2006-12-062-53/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean-up: The RPC client currently creates some sysctls that are specific to the socket transport. Move those entirely into xprtsock.c. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* | | SUNRPC: create stubs for xprtsock init and cleanupChuck Lever2006-12-062-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | Over time we will want to add some specific init and cleanup logic for the xprtsock implementation. Add stub routines for initialization and exit processing. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* | | SUNRPC: Rename skb_reader_t and friendsChuck Lever2006-12-062-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean-up: hch suggested that the RPC client shouldn't pollute the name space used by the generic skb manipulation routines in net/core/skbuff.c. Rename a couple of types in xdr.h to adhere to this convention. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* | | SUNRPC: skb_read_bits is the same as xs_tcp_copy_dataChuck Lever2006-12-062-27/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean-up: eliminate xs_tcp_copy_data -- it's exactly the same logic as the common routine skb_read_bits. The UDP and TCP socket read code now share the same routine for copying data into an xdr_buf. Now that skb_read_bits() is exported, rename it to avoid confusing it with a generic skb_* function. As these functions are XDR-specific, they should not have names that suggest they are of generic use. Also rename skb_read_and_csum_bits() to be consistent. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* | | SUNRPC: Make address format buffers more genericChuck Lever2006-12-062-20/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For now we will assume that all transports will use the address format buffers in the rpc_xprt struct to store their addresses. Change rpc_peer2str() to be a generic routine to handle this, and get rid of the print_address() op in the rpc_xprt_ops vector. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* | | SUNRPC: move saved socket callback functions to a private data structureChuck Lever2006-12-061-9/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | Move the three fields for saving socket callback functions out of the rpc_xprt structure and into a private data structure maintained in net/sunrpc/xprtsock.c. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* | | SUNRPC: Move the UDP socket bufsize parameters to a private data structureChuck Lever2006-12-061-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | Move the socket-specific buffer size parameters for UDP sockets to a private data structure maintained in net/sunrpc/xprtsock.c. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* | | SUNRPC: Move rpc_xprt socket connect fields into private data structureChuck Lever2006-12-061-18/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | Move the socket-specific connection management fields out of the generic rpc_xprt structure into a private data structure maintained in net/sunrpc/xprtsock.c. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* | | SUNRPC: Move TCP state flags into xprtsock.cChuck Lever2006-12-061-20/+29
| | | | | | | | | | | | | | | | | | | | | | | | Move "XPRT_LAST_FRAG" and friends from xprt.h into xprtsock.c, and rename them to use the naming scheme in use in xprtsock.c. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* | | SUNRPC: Move TCP receive state variables into private data structureChuck Lever2006-12-061-68/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the TCP receive state variables from the generic rpc_xprt structure to a private structure maintained inside net/sunrpc/xprtsock.c. Also rename a function/variable pair to refer to RPC fragment headers instead of record markers, to be consistent with types defined in sunrpc/*.h. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* | | SUNRPC: Remove sock and inet fields from rpc_xprtChuck Lever2006-12-061-23/+39
| | | | | | | | | | | | | | | | | | | | | | | | The "sock" and "inet" fields are socket-specific. Move them to a private data structure maintained entirely within net/sunrpc/xprtsock.c Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* | | SUNRPC: Allocate a private data area for socket-specific rpc_xprt fieldsChuck Lever2006-12-061-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | When setting up a new transport instance, allocate enough memory for an rpc_xprt and a private area. As part of the same memory allocation, it will be easy to find one, given a pointer to the other. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
OpenPOWER on IntegriCloud