The following set of patches fix known issues with the 2.6.19 NFS client code, and significantly enhance the support for NFSv4.
From: Christophe Saout <christophe@saout.de>
Date: Sun, 05 Nov 2006 18:42:48 +0100
Subject: Re: [PATCH] Fix SUNRPC wakeup/execute race condition
The sunrpc scheduler contains a race condition that can let an RPC task end up being neither running nor on any wait queue. The race takes place between rpc_make_runnable (called from rpc_wake_up_task) and __rpc_execute under the following condition:
First __rpc_execute calls tk_action which puts the task on some wait queue. The task is dequeued by another process before __rpc_execute continues its execution. While executing rpc_make_runnable exactly after setting the task `running' bit and before clearing the `queued' bit __rpc_execute picks up execution, clears `running' and subsequently both functions fall through, both under the false assumption somebody else took the job.
Swapping rpc_test_and_set_running with rpc_clear_queued in rpc_make_runnable fixes that hole. This introduces another possible race condition that can be handled by checking for `queued' after setting the `running' bit.
Bug noticed on a 4-way x86_64 system under XEN with an NFSv4 server on the same physical machine, apparently one of the few ways to hit this race condition at all.
Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Cc: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Christophe Saout <christophe@saout.de>
Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
From: Trond Myklebust <Trond.Myklebust@netapp.com>
Date: Sat, 11 Nov 2006 22:18:03 -0500
Fix a second potential rpc_wakeup race...
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: Trond Myklebust <Trond.Myklebust@netapp.com>
Date: 1163453024 -0500
SUNRPC: Fix a potential race in rpc_wake_up_task()
Use RCU to ensure that we can safely call rpc_finish_wakeup after we've called __rpc_do_wake_up_task. If not, there is a theoretical race, in which the rpc_task finishes executing, and gets freed first.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: Andy Ryan <genanr@allantgroup.com>
Date: 1162931786 -0600
NFS Exclusive open not supported bug
When trying to open a file with the O_EXCL flag over NFS on a server that does not support exclusive mode, the file does not open. The reason, rpc_call_sync returns a errno number, and not the nfs error number. I fixed it by changing the status check in nfs3proc.c. Either this is how it should be fixed, or rpc_call_sync should be fixed to return the NFS error.
Signed-off-by: Andy Ryan <genanr@allantgroup.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: Trond Myklebust <Trond.Myklebust@netapp.com>
Date: 1163538743 -0500
NFS: Fix asynchronous read error handling
We must always call ->read_done() before we truncate the page data, or decide to flag an error. The reasons are that in NFSv2, ->read_done() is where the eof flag gets set. in NFSv3/v4 ->read_done() handles EJUKEBOX-type errors, and v4 state recovery.
However, we need to mark the pages as uptodate before we deal with short read errors, since we may need to modify the nfs_read_data arguments.
We therefore split the current nfs_readpage_result() into two parts: nfs_readpage_result(), which calls ->read_done() etc, and nfs_readpage_retry(), which subsequently handles short reads.
Note: Removing the code that retries in case of a short read also fixes a bug in nfs_direct_read_result(), which used to return a corrupted number of bytes.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: Trond Myklebust <Trond.Myklebust@netapp.com>
Date: 1163972692 -0500
NFS: Fix missing page_unlock() in nfs_readpage
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: Trond Myklebust <Trond.Myklebust@netapp.com>
Date: 1163629916 -0500
NFS: Fix nfs_sync_inode_wait(FLUSH_INVALIDATE)
Currently nfs_sync_inode_wait() will fail to loop correctly when we call nfs_sync_inode_wait with the FLUSH_INVALIDATE argument.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: Trond Myklebust <Trond.Myklebust@netapp.com>
Date: 1164123623 -0500
SUNRPC: Handle the cases where rpc_alloc_iostats() fails
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: Trond Myklebust <Trond.Myklebust@netapp.com>
Date: 1163695047 -0500
SUNRPC: Give cloned RPC clients their own rpc_pipefs directory
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: Trond Myklebust <Trond.Myklebust@netapp.com>
Date: Wed, 18 Oct 2006 16:01:05 -0400
SUNRPC: Fix up missing BKL in asynchronous RPC callback functions
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: Trond Myklebust <Trond.Myklebust@netapp.com>
Date: Wed, 18 Oct 2006 16:01:06 -0400
SUNRPC: Remove BKL around the RPC socket operations etc.
All internal RPC client operations should no longer depend on the BKL, however lockd and NFS callbacks may still require it.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: Frank Filz <ffilzlnx@us.ibm.com>
Date: Tue, 17 Oct 2006 10:24:36 -0700
NFS: Remove use of the Big Kernel Lock around calls to rpc_execute.
Remove use of the Big Kernel Lock around calls to rpc_execute.
Signed-off-by: Frank Filz <ffilz@us.ibm.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: Frank Filz <ffilzlnx@us.ibm.com>
Date: Tue, 17 Oct 2006 10:24:38 -0700
NFS: Remove use of the Big Kernel Lock around calls to rpc_call_sync
Remove use of the Big Kernel Lock around calls to rpc_call_sync.
Signed-off-by: Frank Filz <ffilz@us.ibm.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: Frank Filz <ffilzlnx@us.ibm.com>
Date: Tue, 17 Oct 2006 10:24:42 -0700
NFS: Remove use of the Big Kernel Lock around nfs calls to readlink
Remove use of the Big Kernel Lock around indirect calls to nfs3_proc_readlink and nfs4_proc_readlink, both of which basically call rpc_call_sync.
Signed-off-by: Frank Filz <ffilz@us.ibm.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> ---- ### Diffstat output symlink.c | 2 -- 1 files changed, 2 deletions(-)
From: Trond Myklebust <Trond.Myklebust@netapp.com>
Date: 1157051359 -0400
SUNRPC: Clean up argument types in xdr.c
Converts various integer buffer offsets and sizes to unsigned integer.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: Trond Myklebust <Trond.Myklebust@netapp.com>
Date: 1161107244 -0400
SUNRPC: Add __(read|write)_bytes_from_xdr_buf
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: Trond Myklebust <Trond.Myklebust@netapp.com>
Date: 1160446102 -0400
SUNRPC: Ensure xdr_buf_read_netobj() checks for memory overruns
Also clean up the code...
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: Trond Myklebust <Trond.Myklebust@netapp.com>
Date: 1161111982 -0400
SUNRPC: Clean up xs_send_pages()
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: Chuck Lever <chuck.lever@oracle.com>
Date: Tue, 17 Oct 2006 14:44:24 -0400
SUNRPC: minor optimization of "xid" field in rpc_xprt
Move the xid field in the rpc_xprt structure to be in the same cache line as the reserve_lock, since these are used at the same time.
Test plan: None.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: Chuck Lever <chuck.lever@oracle.com>
Date: Tue, 17 Oct 2006 14:44:27 -0400
SUNRPC: Make the transport-specific setup routine allocate rpc_xprt
Change the location where the rpc_xprt structure is allocated so each transport implementation can allocate a private area from the same chunk of memory.
Note also that xprt->ops->destroy, rather than xprt_destroy, is now responsible for freeing rpc_xprt when the transport is destroyed.
Test plan: Connectathon.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: Trond Myklebust <Trond.Myklebust@netapp.com>
Date: Sat, 16 Sep 2006 13:04:50 -0400
NFS: Clean up nfs_flush_inode()
Make it take a struct writepages argument, and rename to nfs_flush_mapping().
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: Trond Myklebust <Trond.Myklebust@netapp.com>
Date: Sun, 17 Sep 2006 14:46:44 -0400
NFS: Clean up nfs_scan_dirty()
Pass down struct writeback control.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: Trond Myklebust <Trond.Myklebust@netapp.com>
Date: Mon, 9 Oct 2006 16:18:38 -0400
NFS: cleanup of nfs_sync_inode_wait()
Allow callers to directly pass it a struct writeback_control.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: Trond Myklebust <Trond.Myklebust@netapp.com>
Date: Tue, 5 Dec 2006 00:35:35 -0500
NFS: Store pointer to the nfs_page in page->private
This will allow fast lookup of the nfs_page from the struct page instead of having to search the radix tree.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: Trond Myklebust <Trond.Myklebust@netapp.com>
Date: Tue, 5 Dec 2006 00:35:38 -0500
NFS: Cleanup: add common helper nfs_page_length()
Clean up a lot of ad-hoc page length calculations in fs/nfs/write.c
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: Trond Myklebust <Trond.Myklebust@netapp.com>
Date: Tue, 5 Dec 2006 00:35:39 -0500
NFS: Remove call to igrab() from nfs_writepage()
We always ensure that the nfs_open_context holds a reference to the dentry, so the test in nfs_writepage() for whether or not the inode is referenced is redundant.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: Trond Myklebust <Trond.Myklebust@netapp.com>
Date: Tue, 5 Dec 2006 00:35:39 -0500
NFS: More cleanups of fs/nfs/write.c
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: Trond Myklebust <Trond.Myklebust@netapp.com>
Date: Tue, 5 Dec 2006 00:35:40 -0500
NFS: Remove nfs_writepage_sync()
Maintaining two parallel ways of doing synchronous writes is rather pointless. This patch gets rid of the legacy nfs_writepage_sync(), and replaces it with the faster asynchronous writes.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: Trond Myklebust <Trond.Myklebust@netapp.com>
Date: Tue, 5 Dec 2006 00:35:40 -0500
NFS: Add nfs_set_page_dirty()
We will want to allow nfs_writepage() to distinguish between pages that have been marked as dirty by the VM, and those that have been marked as dirty by nfs_updatepage(). In the former case, the entire page will want to be written out, and so any requests that were pending need to be flushed out first.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: Trond Myklebust <Trond.Myklebust@netapp.com>
Date: Tue, 5 Dec 2006 00:35:41 -0500
NFS: Ensure that nfs_wb_page() calls writepage when necessary.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: Trond Myklebust <Trond.Myklebust@netapp.com>
Date: Tue, 5 Dec 2006 00:35:41 -0500
NFS: Make nfs_updatepage() mark the page as dirty.
This will ensure that we can call set_page_writeback() from within nfs_writepage(), which is always called with the page lock set.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: Trond Myklebust <Trond.Myklebust@netapp.com>
Date: Tue, 5 Dec 2006 00:35:42 -0500
NFS: Ensure we only call set_page_writeback() under the page lock
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: Trond Myklebust <Trond.Myklebust@netapp.com>
Date: Tue, 5 Dec 2006 00:35:42 -0500
NFS: Fix nfs_release_page
invalidate_inode_pages2_range() will clear the PG_dirty bit before calling try_to_release_page().
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: Trond Myklebust <Trond.Myklebust@netapp.com>
Date: Tue, 5 Dec 2006 00:35:42 -0500
NFS: Ensure the inode is marked as dirty if we break out of nfs_wb_all()
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: Trond Myklebust <Trond.Myklebust@netapp.com>
Date: Tue, 5 Dec 2006 00:36:09 -0500
NFS: Fix up the dirty page accounting
There is now no reason to account for the dirty pages in the NFS code, since the VM code will now do it for us via __set_page_dirty_nobuffers(), and set_page_writeback().
We still need to keep the accounting of stable writes, though.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: Trond Myklebust <Trond.Myklebust@netapp.com>
Date: Tue, 5 Dec 2006 00:36:56 -0500
NFS: Fix up writeback_control->nr_to_write accounting
We're really accounting for the same page twice now: once in generic_writepages(), and once in nfs_scan_dirty().
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: Trond Myklebust <Trond.Myklebust@netapp.com>
Date: Tue, 5 Dec 2006 00:45:19 -0500
NFS: Clean up calls to mark_inode_dirty() part 2
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: Chuck Lever <chuck.lever@oracle.com>
Date: Thu, 16 Nov 2006 15:03:38 -0500
SUNRPC: another pmap wakeup fix
Don't wake up bind waiters if a task finds that another task is already trying to bind.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: J. Bruce Fields <bfields@citi.umich.edu>
Date: Mon, 4 Dec 2006 20:22:31 -0500
rpc: gss: eliminate print_hexl()'s
Dumping all this data to the logs is wasteful (even when debugging is turned off), and creates too much output to be useful when it's turned on.
Fix a minor style bug or two while we're at it.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: J. Bruce Fields <bfields@fieldses.org>
Date: Mon, 4 Dec 2006 20:22:32 -0500
rpc: gss: fix a kmap_atomic race in krb5 code
This code is never called from interrupt context; it's always run by either a user thread or rpciod. So KM_SKB_SUNRPC_DATA is inappropriate here.
Thanks to Aimé Le Rouzic for capturing an oops which showed the kernel taking an interrupt while we were in this piece of code, resulting in a nested kmap_atomic(.,KM_SKB_SUNRPC_DATA) call from xdr_partial_copy_from_skb().
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: Olga Kornievskaia <aglo@citi.umich.edu>
Date: Mon, 4 Dec 2006 20:22:33 -0500
rpc: move process_xdr_buf
Since process_xdr_buf() is useful outside of the kerberos-specific code, we move it to net/sunrpc/xdr.c, export it, and rename it in keeping with xdr_* naming convention of xdr.c.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: Olga Kornievskaia <aglo@citi.umich.edu>
Date: Mon, 4 Dec 2006 20:22:34 -0500
rpc: spkm3 update
This updates the spkm3 code to bring it up to date with our current understanding of the spkm3 spec.
In doing so, we're changing the downcall format used by gssd in the spkm3 case, which will cause an incompatilibity with old userland spkm3 support. Since the old code a) didn't implement the protocol correctly, and b) was never distributed except in the form of some experimental patches from the citi web site, we're assuming this is OK.
We do detect the old downcall format and print warning (and fail). We also include a version number in the new downcall format, to be used in the future in case any further change is required.
In some more detail:
- fix integrity support
- removed dependency on NIDs. instead OIDs are used
- known OID values for algorithms added.
- fixed some context fields and types
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: J. Bruce Fields <bfields@fieldses.org>
Date: Mon, 4 Dec 2006 20:22:35 -0500
gss: krb5: remove signalg and sealalg
We designed the krb5 context import without completely understanding the context. Now it's clear that there are a number of fields that we ignore, or that we depend on having one single value.
In particular, we only support one value of signalg currently; so let's check the signalg field in the downcall (in case we decide there's something else we could support here eventually), but ignore it otherwise.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: J. Bruce Fields <bfields@fieldses.org>
Date: Mon, 4 Dec 2006 20:22:36 -0500
rpcgss: krb5: expect a constant signalg value
We also only ever receive one value of the signalg, so let's not pretend otherwise
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: J. Bruce Fields <bfields@fieldses.org>
Date: Mon, 4 Dec 2006 20:22:37 -0500
rpcgss: krb5: kill checksum_type, miscellaneous small cleanup
Previous changes reveal some obvious cruft.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: J. Bruce Fields <bfields@fieldses.org>
Date: Mon, 4 Dec 2006 20:22:38 -0500
rpcgss: simplify make_checksum
We're doing some pointless translation between krb5 constants and kernel crypto string names.
Also clean up some related spkm3 code as necessary.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: J. Bruce Fields <bfields@fieldses.org>
Date: Mon, 4 Dec 2006 20:22:39 -0500
rpcgss: krb5: clean up some goto's, etc.
Remove some unnecessary goto labels; clean up some return values; etc.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: J. Bruce Fields <bfields@fieldses.org>
Date: Mon, 4 Dec 2006 20:22:40 -0500
rpcgss: krb5: sanity check sealalg value in the downcall
The sealalg is checked in several places, giving the impression it could be either SEAL_ALG_NONE or SEAL_ALG_DES. But in fact SEAL_ALG_NONE seems to be sufficient only for making mic's, and all the contexts we get must be capable of wrapping as well. So the sealalg must be SEAL_ALG_DES. As with signalg, just check for the right value on the downcall and ignore it otherwise. Similarly, tighten expectations for the sealalg on incoming tokens, in case we do support other values eventually.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: J. Bruce Fields <bfields@fieldses.org>
Date: Mon, 4 Dec 2006 20:22:41 -0500
rpcgss: krb5: ignore seed
We're currently not actually using seed or seed_init.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: J. Bruce Fields <bfields@fieldses.org>
Date: Mon, 4 Dec 2006 20:22:42 -0500
rpcgss: krb5: miscellaneous cleanup
Miscellaneous cosmetic fixes.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: Chuck Lever <chuck.lever@oracle.com>
Date: Tue, 05 Dec 2006 16:35:11 -0500
SUNRPC: Allocate a private data area for socket-specific rpc_xprt fields
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>
From: Chuck Lever <chuck.lever@oracle.com>
Date: Tue, 05 Dec 2006 16:35:15 -0500
SUNRPC: Remove sock and inet fields from rpc_xprt
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>
From: Chuck Lever <chuck.lever@oracle.com>
Date: Tue, 05 Dec 2006 16:35:19 -0500
SUNRPC: Move TCP receive state variables into private data structure
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>
From: Chuck Lever <chuck.lever@oracle.com>
Date: Tue, 05 Dec 2006 16:35:23 -0500
SUNRPC: Move TCP state flags into xprtsock.c
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>
From: Chuck Lever <chuck.lever@oracle.com>
Date: Tue, 05 Dec 2006 16:35:26 -0500
SUNRPC: Move rpc_xprt socket connect fields into private data structure
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>
From: Chuck Lever <chuck.lever@oracle.com>
Date: Tue, 05 Dec 2006 16:35:30 -0500
SUNRPC: Move the UDP socket bufsize parameters to a private data structure
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>
From: Chuck Lever <chuck.lever@oracle.com>
Date: Tue, 05 Dec 2006 16:35:34 -0500
SUNRPC: move saved socket callback functions to a private data structure
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>
From: Chuck Lever <chuck.lever@oracle.com>
Date: Tue, 05 Dec 2006 16:35:37 -0500
SUNRPC: Make address format buffers more generic
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>
From: Chuck Lever <chuck.lever@oracle.com>
Date: Tue, 05 Dec 2006 16:35:41 -0500
SUNRPC: skb_read_bits is the same as xs_tcp_copy_data
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>
From: Chuck Lever <chuck.lever@oracle.com>
Date: Tue, 05 Dec 2006 16:35:44 -0500
SUNRPC: Rename skb_reader_t and friends
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>
From: Chuck Lever <chuck.lever@oracle.com>
Date: Tue, 05 Dec 2006 16:35:51 -0500
SUNRPC: create stubs for xprtsock init and cleanup
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>
From: Chuck Lever <chuck.lever@oracle.com>
Date: Tue, 05 Dec 2006 16:35:54 -0500
SUNRPC: relocate the creation of socket-specific tunables
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>
From: Chuck Lever <chuck.lever@oracle.com>
Date: Tue, 05 Dec 2006 16:36:03 -0500
NLM: fix print format for tk_pid
The tk_pid field is an unsigned short. The proper print format specifier for that type is %5u, not %4d.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
From: Chuck Lever <chuck.lever@oracle.com>
Date: Tue, 05 Dec 2006 16:36:14 -0500
SUNRPC: Remove pprintk() from net/sunrpc/xprt.c
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>
All of the above