aboutsummaryrefslogtreecommitdiff
path: root/include/linux/sunrpc
AgeCommit message (Collapse)AuthorFilesLines
2008-07-02svcrdma: Add dma map count and WARN_ONTom Tucker1-0/+1
Add a dma map count in order to verify that all DMA mapping resources have been freed when the transport is closed. Signed-off-by: Tom Tucker <[email protected]>
2008-07-02svcrdma: Use reply and chunk map for RDMA_READ processingTom Tucker1-0/+1
Modify the RDMA_READ processing to use the reply and chunk list mapping data types. Also add a special purpose 'hdr_count' field in in the context to hold the header page count instead of overloading the SGE length field and corrupting the DMA map length. Signed-off-by: Tom Tucker <[email protected]>
2008-07-02svcrdma: Add a type for keeping NFS RPC mappingTom Tucker1-0/+27
Create a new data structure to hold the remote client address space to local server address space mapping. Signed-off-by: Tom Tucker <[email protected]>
2008-06-23gss_krb5: create a define for token header size and clean up ptr locationKevin Coffman1-0/+3
cleanup: Document token header size with a #define instead of open-coding it. Don't needlessly increment "ptr" past the beginning of the header which makes the values passed to functions more understandable and eliminates the need for extra "krb5_hdr" pointer. Clean up some intersecting white-space issues flagged by checkpatch.pl. This leaves the checksum length hard-coded at 8 for DES. A later patch cleans that up. Signed-off-by: Kevin Coffman <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2008-06-23sunrpc: remove sv_kill_signal field from svc_serv structJeff Layton1-3/+2
Since we no longer make any distinction between shutdown signals with nfsd, then it becomes easier to just standardize on a particular signal to use to bring it down (SIGINT, in this case). Signed-off-by: Jeff Layton <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2008-06-23knfsd: convert knfsd to kthread APIJeff Layton1-1/+1
This patch is rather large, but I couldn't figure out a way to break it up that would remain bisectable. It does several things: - change svc_thread_fn typedef to better match what kthread_create expects - change svc_pool_map_set_cpumask to be more kthread friendly. Make it take a task arg and and get rid of the "oldmask" - have svc_set_num_threads call kthread_create directly - eliminate __svc_create_thread Signed-off-by: Jeff Layton <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2008-06-11net: remove CVS keywordsAdrian Bunk3-7/+0
This patch removes CVS keywords that weren't updated for a long time from comments. Signed-off-by: Adrian Bunk <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-05-19svcrdma: Change svc_rdma_send_error return type to voidTom Tucker1-2/+2
The svc_rdma_send_error function is called when an RPCRDMA protocol error is detected. This function attempts to post an error reply message. Since an error posting to a transport in error is ignored, change the return type to void. Signed-off-by: Tom Tucker <[email protected]>
2008-05-19svcrdma: Move destroy to kernel threadTom Tucker1-0/+1
Some providers may wait while destroying adapter resources. Since it is possible that the last reference is put on the dto_tasklet, the actual destroy must be scheduled as a work item. Signed-off-by: Tom Tucker <[email protected]>
2008-05-19svcrdma: Use standard Linux lists for context cacheTom Tucker1-2/+3
Replace the one-off linked list implementation used to implement the context cache with the standard Linux list_head lists. Add a context counter to catch resource leaks. A WARN_ON will be added later to ensure that we've freed all contexts. Signed-off-by: Tom Tucker <[email protected]>
2008-05-19svcrdma: Simplify RDMA_READ deferral buffer managementTom Tucker1-0/+1
An NFS_WRITE requires a set of RDMA_READ requests to fetch the write data from the client. There are two principal pieces of data that need to be tracked: the list of pages that comprise the completed RPC and the SGE of dma mapped pages to refer to this list of pages. Previously this whole bit was managed as a linked list of contexts with the context containing the page list buried in this list. This patch simplifies this processing by not keeping a linked list, but rather only a pionter from the last submitted RDMA_READ's context to the context that maps the set of pages that describe the RPC. This significantly simplifies this code path. SGE contexts are cleaned up inline in the DTO path instead of at read completion time. Signed-off-by: Tom Tucker <[email protected]>
2008-05-19svcrdma: Remove unused READ_DONE context flags bitTom Tucker1-1/+0
The RDMACTXT_F_READ_DONE bit is not longer used. Remove it. Signed-off-by: Tom Tucker <[email protected]>
2008-04-24Merge git://git.linux-nfs.org/projects/trondmy/nfs-2.6Linus Torvalds5-37/+41
* git://git.linux-nfs.org/projects/trondmy/nfs-2.6: (80 commits) SUNRPC: Invalidate the RPCSEC_GSS session if the server dropped the request make nfs_automount_list static NFS: remove duplicate flags assignment from nfs_validate_mount_data NFS - fix potential NULL pointer dereference v2 SUNRPC: Don't change the RPCSEC_GSS context on a credential that is in use SUNRPC: Fix a race in gss_refresh_upcall() SUNRPC: Don't disconnect more than once if retransmitting NFSv4 requests SUNRPC: Remove the unused export of xprt_force_disconnect SUNRPC: remove XS_SENDMSG_RETRY SUNRPC: Protect creds against early garbage collection NFSv4: Attempt to use machine credentials in SETCLIENTID calls NFSv4: Reintroduce machine creds NFSv4: Don't use cred->cr_ops->cr_name in nfs4_proc_setclientid() nfs: fix printout of multiword bitfields nfs: return negative error value from nfs{,4}_stat_to_errno NLM/lockd: Ensure client locking calls use correct credentials NFS: Remove the buggy lock-if-signalled case from do_setlk() NLM/lockd: Fix a race when cancelling a blocking lock NLM/lockd: Ensure that nlmclnt_cancel() returns results of the CANCEL call NLM: Remove the signal masking in nlmclnt_proc/nlmclnt_cancel ...
2008-04-23SUNRPC: Update RPC server's TCP record marker decoderChuck Lever1-2/+2
Clean up: Update the RPC server's TCP record marker decoder to match the constructs used by the RPC client's TCP socket transport. Signed-off-by: Chuck Lever <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2008-04-23SUNRPC: remove svc_create_thread()Jeff Layton1-1/+0
Now that the nfs4 callback thread uses the kthread API, there are no more users of svc_create_thread(). Remove it. Signed-off-by: Jeff Layton <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2008-04-23gss_krb5: consistently use unsigned for seqnumKevin Coffman1-2/+2
Consistently use unsigned (u32 vs. s32) for seqnum. In get_mic function, send the local copy of seq_send, rather than the context version. Signed-off-by: Kevin Coffman <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2008-04-23Remove define for KRB5_CKSUM_LENGTH, which will become enctype-dependentKevin Coffman1-2/+0
cleanup: When adding new encryption types, the checksum length can be different for each enctype. Face the fact that the current code only supports DES which has a checksum length of 8. Signed-off-by: Kevin Coffman <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2008-04-23svcrpc: move unused field from cache_deferred_reqJ. Bruce Fields1-1/+0
This field is set once and never used; probably some artifact of an earlier implementation idea. Signed-off-by: J. Bruce Fields <[email protected]>
2008-04-23IPv6 support for NFS server export cachesAurélien Charbon1-2/+3
This adds IPv6 support to the interfaces that are used to express nfsd exports. All addressed are stored internally as IPv6; backwards compatibility is maintained using mapped addresses. Thanks to Bruce Fields, Brian Haley, Neil Brown and Hideaki Joshifuji for comments Signed-off-by: Aurelien Charbon <[email protected]> Cc: Neil Brown <[email protected]> Cc: Brian Haley <[email protected]> Cc: YOSHIFUJI Hideaki / 吉藤英明 <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2008-04-19SUNRPC: Don't disconnect more than once if retransmitting NFSv4 requestsTrond Myklebust1-0/+8
NFSv4 requires us to ensure that we break the TCP connection before we're allowed to retransmit a request. However in the case where we're retransmitting several requests that have been sent on the same connection, we need to ensure that we don't interfere with the attempt to reconnect and/or break the connection again once it has been established. We therefore introduce a 'connection' cookie that is bumped every time a connection is broken. This allows requests to track if they need to force a disconnection. Signed-off-by: Trond Myklebust <[email protected]>
2008-04-19NFSv4: Reintroduce machine credsTrond Myklebust2-0/+3
We need to try to ensure that we always use the same credentials whenever we re-establish the clientid on the server. If not, the server won't recognise that we're the same client, and so may not allow us to recover state. Signed-off-by: Trond Myklebust <[email protected]>
2008-04-19NFSv4: Don't use cred->cr_ops->cr_name in nfs4_proc_setclientid()Trond Myklebust1-2/+0
With the recent change to generic creds, we can no longer use cred->cr_ops->cr_name to distinguish between RPCSEC_GSS principals and AUTH_SYS/AUTH_NULL identities. Replace it with the rpc_authops->au_name instead... Signed-off-by: Trond Myklebust <[email protected]>
2008-04-19SUNRPC: Fix up xprt_write_space()Trond Myklebust1-1/+1
The rest of the networking layer uses SOCK_ASYNC_NOSPACE to signal whether or not we have someone waiting for buffer memory. Convert the SUNRPC layer to use the same idiom. Remove the unlikely()s in xs_udp_write_space and xs_tcp_write_space. In fact, the most common case will be that there is nobody waiting for buffer space. SOCK_NOSPACE is there to tell the TCP layer whether or not the cwnd was limited by the application window. Ensure that we follow the same idiom as the rest of the networking layer here too. Finally, ensure that we clear SOCK_ASYNC_NOSPACE once we wake up, so that write_space() doesn't keep waking things up on xprt->pending. Signed-off-by: Trond Myklebust <[email protected]>
2008-03-14SUNRPC: Add an rpc_credop callback for binding a credential to an rpc_taskTrond Myklebust1-0/+2
We need the ability to treat 'generic' creds specially, since they want to bind instances of the auth cred instead of binding themselves. Signed-off-by: Trond Myklebust <[email protected]>
2008-03-14SUNRPC: Add a generic RPC credentialTrond Myklebust1-0/+3
Add an rpc credential that is not tied to any particular auth mechanism, but that can be cached by NFS, and later used to look up a cred for whichever auth mechanism that turns out to be valid when the RPC call is being made. Signed-off-by: Trond Myklebust <[email protected]>
2008-03-14SUNRPC: Clean up rpcauth_bindcred()Trond Myklebust1-3/+1
Signed-off-by: Trond Myklebust <[email protected]>
2008-03-14SUNRPC: Fix RPCAUTH_LOOKUP_ROOTCREDSTrond Myklebust1-2/+2
The current RPCAUTH_LOOKUP_ROOTCREDS flag only works for AUTH_SYS authentication, and then only as a special case in the code. This patch removes the auth_sys special casing, and replaces it with generic code. Signed-off-by: Trond Myklebust <[email protected]>
2008-03-14SUNRPC: Fix a bug in rpcauth_lookup_credcache()Trond Myklebust1-2/+2
The hash bucket is for some reason always being set to zero. Signed-off-by: Trond Myklebust <[email protected]>
2008-02-28Merge branch 'cleanups' into nextTrond Myklebust1-4/+5
2008-02-28SUNRPC: Remove now-redundant RCU-safe rpc_task free pathTrond Myklebust1-2/+0
Now that we've tightened up the locking rules for RPC queue wakeups, we can remove the RCU-safe kfree calls... Signed-off-by: Trond Myklebust <[email protected]>
2008-02-28SUNRPC: Eliminate the now-redundant rpc_start_wakeup()Trond Myklebust1-11/+1
Signed-off-by: Trond Myklebust <[email protected]>
2008-02-28SUNRPC: Switch tasks to using the rpc_waitqueue's timer functionTrond Myklebust1-8/+1
Signed-off-by: Trond Myklebust <[email protected]>
2008-02-28SUNRPC: Add a timer function to wait queues.Trond Myklebust1-0/+9
This is designed to replace the timeout timer in the individual rpc_tasks. By putting the timer function in the wait queue, we will eventually be able to reduce the total number of timers in use by the RPC subsystem. Signed-off-by: Trond Myklebust <[email protected]>
2008-02-28SUNRPC: Add a (empty for the moment) destructor for rpc_wait_queuesTrond Myklebust1-0/+1
Signed-off-by: Trond Myklebust <[email protected]>
2008-02-25SUNRPC: Run rpc timeout functions as callbacks instead of in softirqsTrond Myklebust1-3/+1
An audit of the current RPC timeout functions shows that they don't really ever need to run in the softirq context. As long as the softirq is able to signal that the wakeup is due to a timeout (which it can do by setting task->tk_status to -ETIMEDOUT) then the callback functions can just run as standard task->tk_callback functions (in the rpciod/process context). The only possible border-line case would be xprt_timer() for the case of UDP, when the callback is used to reduce the size of the transport congestion window. In testing, however, the effect of moving that update to a callback would appear to be minor. Signed-off-by: Trond Myklebust <[email protected]>
2008-02-25SUNRPC: Convert users of rpc_wake_up_task to use rpc_wake_up_queued_taskTrond Myklebust1-1/+0
Signed-off-by: Trond Myklebust <[email protected]>
2008-02-25SUNRPC: Add a new helper rpc_wake_up_queued_task()Trond Myklebust1-1/+3
In all cases where we currently use rpc_wake_up_task(), we almost always know on which waitqueue the rpc_task is actually sleeping. This will allows us to simplify the queue locking in a future patch. Signed-off-by: Trond Myklebust <[email protected]>
2008-02-25SUNRPC: Allow the rpc_release() callback to be run on another workqueueTrond Myklebust1-0/+1
A lot of the work done by the rpc_release() callback is inappropriate for rpciod as it will often involve things like starting a new rpc call in order to clean up state after an interrupted NFSv4 open() call, or calls to mntput(), etc. This patch allows the caller of rpc_run_task() to specify that the rpc_release callback should run on a different workqueue than the default rpciod_workqueue. Signed-off-by: Trond Myklebust <[email protected]>
2008-02-14SUNRPC: Declare as const the rpc_message arguments to rpc_call_sync/asyncTrond Myklebust1-4/+5
Signed-off-by: Trond Myklebust <[email protected]>
2008-02-10nfsd: clean up svc_reserve_auth()J. Bruce Fields1-8/+5
This is a void function attempting to return the return value from another void function, which seems harmless but extremely weird, and apparently makes some compilers complain. While we're there, clean up a little (e.g. the switch statement had a minor style problem and seemed overkill as long as there's only one case). Thanks to Trond for noticing this. Signed-off-by: J. Bruce Fields <[email protected]> Cc: Trond Myklebust <[email protected]>
2008-02-01SUNRPC: spin svc_rqst initialization to its own functionJeff Layton1-0/+2
Move the initialzation in __svc_create_thread that happens prior to thread creation to a new function. Export the function to allow services to have better control over the svc_rqst structs. Also rearrange the rqstp initialization to prevent NULL pointer dereferences in svc_exit_thread in case allocations fail. Signed-off-by: Jeff Layton <[email protected]> Reviewed-by: NeilBrown <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2008-02-01rdma: SVCRMDA Header FileTom Tucker1-0/+262
This file defines the data types used by the SVCRDMA transport module. The principle data structure is the transport specific extension to the svcxprt structure. Signed-off-by: Tom Tucker <[email protected]> Acked-by: Neil Brown <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2008-02-01svc: Add svc_xprt_names service to replace svc_sock_namesTom Tucker1-0/+1
Create a transport independent version of the svc_sock_names function. The toclose capability of the svc_sock_names service can be implemented using the svc_xprt_find and svc_xprt_close services. Signed-off-by: Tom Tucker <[email protected]> Acked-by: Neil Brown <[email protected]> Reviewed-by: Chuck Lever <[email protected]> Reviewed-by: Greg Banks <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2008-02-01svc: Add svc API that queries for a transport instanceTom Tucker1-0/+1
Add a new svc function that allows a service to query whether a transport instance has already been created. This is used in lockd to determine whether or not a transport needs to be created when a lockd instance is brought up. Specifying 0 for the address family or port is effectively a wild-card, and will result in matching the first transport in the service's list that has a matching class name. Signed-off-by: Tom Tucker <[email protected]> Acked-by: Neil Brown <[email protected]> Reviewed-by: Chuck Lever <[email protected]> Reviewed-by: Greg Banks <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2008-02-01svc: Add /proc/sys/sunrpc/transport filesTom Tucker1-0/+1
Add a file that when read lists the set of registered svc transports. Signed-off-by: Tom Tucker <[email protected]> Acked-by: Neil Brown <[email protected]> Reviewed-by: Chuck Lever <[email protected]> Reviewed-by: Greg Banks <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2008-02-01svc: Add transport hdr size for defer/revisitTom Tucker1-0/+2
Some transports have a header in front of the RPC header. The current defer/revisit processing considers only the iov_len and arg_len to determine how much to back up when saving the original request to revisit. Add a field to the rqstp structure to save the size of the transport header so svc_defer can correctly compute the start of a request. Signed-off-by: Tom Tucker <[email protected]> Acked-by: Neil Brown <[email protected]> Reviewed-by: Chuck Lever <[email protected]> Reviewed-by: Greg Banks <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2008-02-01svc: Move the xprt independent code to the svc_xprt.c fileTom Tucker1-0/+27
This functionally trivial patch moves all of the transport independent functions from the svcsock.c file to the transport independent svc_xprt.c file. In addition the following formatting changes were made: - White space cleanup - Function signatures on single line - The inline directive was removed - Lines over 80 columns were reformatted - The term 'socket' was changed to 'transport' in comments - The SMP comment was moved and updated. Signed-off-by: Tom Tucker <[email protected]> Acked-by: Neil Brown <[email protected]> Reviewed-by: Chuck Lever <[email protected]> Reviewed-by: Greg Banks <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2008-02-01svc: Removing remaining references to rq_sock in rqstpTom Tucker1-4/+1
This functionally empty patch removes rq_sock and unamed union from rqstp structure. Signed-off-by: Tom Tucker <[email protected]> Acked-by: Neil Brown <[email protected]> Reviewed-by: Chuck Lever <[email protected]> Reviewed-by: Greg Banks <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2008-02-01svc: Move the sockaddr information to svc_xprtTom Tucker2-4/+51
This patch moves the transport sockaddr to the svc_xprt structure. Convenience functions are added to set and get the local and remote addresses of a transport from the transport provider as well as determine the length of a sockaddr. A transport is responsible for setting the xpt_local and xpt_remote addresses in the svc_xprt structure as part of transport creation and xpo_accept processing. This cannot be done in a generic way and in fact varies between TCP, UDP and RDMA. A set of xpo_ functions (e.g. getlocalname, getremotename) could have been added but this would have resulted in additional caching and copying of the addresses around. Note that the xpt_local address should also be set on listening endpoints; for TCP/RDMA this is done as part of endpoint creation. For connected transports like TCP and RDMA, the addresses never change and can be set once and copied into the rqstp structure for each request. For UDP, however, the local and remote addresses may change for each request. In this case, the address information is obtained from the UDP recvmsg info and copied into the rqstp structure from there. A svc_xprt_local_port function was also added that returns the local port given a transport. This is used by svc_create_xprt when returning the port associated with a newly created transport, and later when creating a generic find transport service to check if a service is already listening on a given port. Signed-off-by: Tom Tucker <[email protected]> Acked-by: Neil Brown <[email protected]> Reviewed-by: Chuck Lever <[email protected]> Reviewed-by: Greg Banks <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2008-02-01svc: Make deferral processing xprt independentTom Tucker3-4/+3
This patch moves the transport independent sk_deferred list to the svc_xprt structure and updates the svc_deferred_req structure to keep pointers to svc_xprt's directly. The deferral processing code is also moved out of the transport dependent recvfrom functions and into the generic svc_recv path. Signed-off-by: Tom Tucker <[email protected]> Acked-by: Neil Brown <[email protected]> Reviewed-by: Chuck Lever <[email protected]> Reviewed-by: Greg Banks <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>