- 30 7月, 2014 1 次提交
-
-
由 Trond Myklebust 提交于
Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
- 18 7月, 2014 1 次提交
-
-
由 Chuck Lever 提交于
The current code always selects XPRT_TRANSPORT_BC_TCP for the back channel, even when the forward channel was not TCP (eg, RDMA). When a 4.1 mount is attempted with RDMA, the server panics in the TCP BC code when trying to send CB_NULL. Instead, construct the transport protocol number from the forward channel transport or'd with XPRT_TRANSPORT_BC. Transports that do not support bi-directional RPC will not have registered a "BC" transport, causing create_backchannel_client() to fail immediately. Fixes: https://bugzilla.linux-nfs.org/show_bug.cgi?id=265Signed-off-by: NChuck Lever <chuck.lever@oracle.com> Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
- 23 5月, 2014 2 次提交
-
-
由 NeilBrown 提交于
If an incoming NFS request is coming from the local host, then nfsd will need to perform some special handling. So detect that possibility and make the source visible in rq_local. Signed-off-by: NNeilBrown <neilb@suse.de> Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
由 Chuck Lever 提交于
An NFS/RDMA client's source port is meaningless for RDMA transports. The transport layer typically sets the source port value on the connection to a random ephemeral port. Currently, NFS server administrators must specify the "insecure" export option to enable clients to access exports via RDMA. But this means NFS clients can access such an export via IP using an ephemeral port, which may not be desirable. This patch eliminates the need to specify the "insecure" export option to allow NFS/RDMA clients access to an export. BugLink: https://bugzilla.linux-nfs.org/show_bug.cgi?id=250Signed-off-by: NChuck Lever <chuck.lever@oracle.com> Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
- 22 8月, 2012 3 次提交
-
-
由 J. Bruce Fields 提交于
Note this isn't used outside svc_xprt.c. May as well move it so we don't need a declaration while we're here. Also remove an outdated comment. Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
由 J. Bruce Fields 提交于
None of the callers should see an unsupported address family (only one of them even bothers to check for that case), so just check for the buggy case in svc_addr_len and don't bother elsewhere. Acked-by: NChuck Lever <chuck.lever@oracle.com> Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
由 J. Bruce Fields 提交于
There's some duplicate code here. Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
- 01 2月, 2012 1 次提交
-
-
由 Stanislav Kinsbursky 提交于
Service transports are parametrized by network namespace. And thus lookup of transport instance have to take network namespace into account. Signed-off-by: NStanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com> Acked-by: NJ. Bruce Fields <bfields@redhat.com>
-
- 07 12月, 2011 2 次提交
-
-
由 Stanislav Kinsbursky 提交于
This patch makes svc_xprt inherit network namespace link from its socket. Signed-off-by: NStanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
由 J. Bruce Fields 提交于
Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
- 01 11月, 2011 1 次提交
-
-
由 Paul Gortmaker 提交于
The <linux/module.h> pretty much brings in the kitchen sink along with it, so it should be avoided wherever reasonably possible in terms of being included from other commonly used <linux/something.h> files, as it results in a measureable increase on compile times. The worst culprit was probably device.h since it is used everywhere. This file also had an implicit dependency/usage of mutex.h which was masked by module.h, and is also fixed here at the same time. There are over a dozen other headers that simply declare the struct instead of pulling in the whole file, so follow their lead and simply make it a few more. Most of the implicit dependencies on module.h being present by these headers pulling it in have been now weeded out, so we can finally make this change with hopefully minimal breakage. Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
-
- 26 1月, 2011 1 次提交
-
-
由 Andy Adamson 提交于
The information required to find the nfs_client cooresponding to the incoming back channel request is contained in the NFS layer. Perform minimal checking in the RPC layer pg_authenticate method, and push more detailed checking into the NFS layer where the nfs_client can be found. Signed-off-by: NAndy Adamson <andros@netapp.com> Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
-
- 12 1月, 2011 1 次提交
-
-
由 J. Bruce Fields 提交于
This seems obviously transport-level information even if it's currently used only by the server socket code. Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
- 07 1月, 2011 1 次提交
-
-
由 Andy Adamson 提交于
The sessions based callback service is started prior to the CREATE_SESSION call so that it can handle CB_NULL requests which can be sent before the CREATE_SESSION call returns and the session ID is known. Set the callback sessionid after a sucessful CREATE_SESSION. Signed-off-by: NAndy Adamson <andros@netapp.com> Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
-
- 18 12月, 2010 1 次提交
-
-
由 NeilBrown 提交于
The xpt_pool field is only used for reporting BUGs. And it isn't used correctly. In particular, when it is cleared in svc_xprt_received before XPT_BUSY is cleared, there is no guarantee that either the compiler or the CPU might not re-order to two assignments, just setting xpt_pool to NULL after XPT_BUSY is cleared. If a different cpu were running svc_xprt_enqueue at this moment, it might see XPT_BUSY clear and then xpt_pool non-NULL, and so BUG. This could be fixed by calling smp_mb__before_clear_bit() before the clear_bit. However as xpt_pool isn't really used, it seems safest to simply remove xpt_pool. Another alternate would be to change the clear_bit to clear_bit_unlock, and the test_and_set_bit to test_and_set_bit_lock. Signed-off-by: NNeilBrown <neilb@suse.de> Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
- 03 11月, 2010 1 次提交
-
-
由 J. Bruce Fields 提交于
If a connection is closed just after a sequence or create_session is sent over it, we could end up trying to register a callback that will never get called since the xprt is already marked dead. Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
- 02 10月, 2010 3 次提交
-
-
由 J. Bruce Fields 提交于
NFSv4.1 needs warning when a client tcp connection goes down, if that connection is being used as a backchannel, so that it can warn the client that it has lost the backchannel connection. Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
-
由 Pavel Emelyanov 提交于
After this the socket creation in it knows the context. Signed-off-by: NPavel Emelyanov <xemul@openvz.org> Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
由 Pavel Emelyanov 提交于
Signed-off-by: NPavel Emelyanov <xemul@openvz.org> Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
- 27 9月, 2010 1 次提交
-
-
由 Pavel Emelyanov 提交于
The transport representation should be per-net of course. Signed-off-by: NPavel Emelyanov <xemul@openvz.org> Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
-
- 12 9月, 2009 1 次提交
-
-
由 Rahul Iyer 提交于
When the call direction is a reply, copy the xid and call direction into the req->rq_private_buf.head[0].iov_base otherwise rpc_verify_header returns rpc_garbage. Signed-off-by: NRahul Iyer <iyer@netapp.com> Signed-off-by: NMike Sager <sager@netapp.com> Signed-off-by: NMarc Eshel <eshel@almaden.ibm.com> Signed-off-by: NBenny Halevy <bhalevy@panasas.com> Signed-off-by: NRicardo Labiaga <Ricardo.Labiaga@netapp.com> Signed-off-by: NAndy Adamson <andros@netapp.com> Signed-off-by: NBenny Halevy <bhalevy@panasas.com> [get rid of CONFIG_NFSD_V4_1] [sunrpc: refactoring of svc_tcp_recvfrom] [nfsd41: sunrpc: create common send routine for the fore and the back channels] [nfsd41: sunrpc: Use free_page() to free server backchannel pages] [nfsd41: sunrpc: Document server backchannel locking] [nfsd41: sunrpc: remove bc_connect_worker()] [nfsd41: sunrpc: Define xprt_server_backchannel()[ [nfsd41: sunrpc: remove bc_close and bc_init_auto_disconnect dummy functions] [nfsd41: sunrpc: eliminate unneeded switch statement in xs_setup_tcp()] [nfsd41: sunrpc: Don't auto close the server backchannel connection] [nfsd41: sunrpc: Remove unused functions] Signed-off-by: NAlexandros Batsakis <batsakis@netapp.com> Signed-off-by: NRicardo Labiaga <Ricardo.Labiaga@netapp.com> Signed-off-by: NBenny Halevy <bhalevy@panasas.com> [nfsd41: change bc_sock to bc_xprt] [nfsd41: sunrpc: move struct rpc_buffer def into a common header file] [nfsd41: sunrpc: use rpc_sleep in bc_send_request so not to block on mutex] [removed cosmetic changes] Signed-off-by: NBenny Halevy <bhalevy@panasas.com> [sunrpc: add new xprt class for nfsv4.1 backchannel] [sunrpc: v2.1 change handling of auto_close and init_auto_disconnect operations for the nfsv4.1 backchannel] Signed-off-by: NAlexandros Batsakis <batsakis@netapp.com> [reverted more cosmetic leftovers] [got rid of xprt_server_backchannel] [separated "nfsd41: sunrpc: add new xprt class for nfsv4.1 backchannel"] Signed-off-by: NBenny Halevy <bhalevy@panasas.com> Cc: Trond Myklebust <trond.myklebust@netapp.com> [sunrpc: change idle timeout value for the backchannel] Signed-off-by: NAlexandros Batsakis <batsakis@netapp.com> Signed-off-by: NBenny Halevy <bhalevy@panasas.com> Acked-by: NTrond Myklebust <trond.myklebust@netapp.com> Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
-
- 29 4月, 2009 2 次提交
-
-
由 Chuck Lever 提交于
The svc_xprt_names() function can overflow its buffer if it's so near the end of the passed in buffer that the "name too long" string still doesn't fit. Of course, it could never tell if it was near the end of the passed in buffer, since its only caller passes in zero as the buffer length. Let's make this API a little safer. Change svc_xprt_names() so it *always* checks for a buffer overflow, and change its only caller to pass in the correct buffer length. If svc_xprt_names() does overflow its buffer, it now fails with an ENAMETOOLONG errno, instead of trying to write a message at the end of the buffer. I don't like this much, but I can't figure out a clean way that's always safe to return some of the names, *and* an indication that the buffer was not long enough. The displayed error when doing a 'cat /proc/fs/nfsd/portlist' is "File name too long". Signed-off-by: NChuck Lever <chuck.lever@oracle.com> Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
-
由 Chuck Lever 提交于
The svc_addr_len() helper function returns -EAFNOSUPPORT if it doesn't recognize the address family of the passed-in socket address. However, the return type of this function is size_t, which means -EAFNOSUPPORT is turned into a very large positive value in this case. The check in svc_udp_recvfrom() to see if the return value is less than zero therefore won't work at all. Additionally, handle_connect_req() passes this value directly to memset(). This could cause memset() to clobber a large chunk of memory if svc_addr_len() has returned an error. Currently the address family of these addresses, however, is known to be supported long before handle_connect_req() is called, so this isn't a real risk. Change the error return value of svc_addr_len() to zero, which fits in the range of size_t, and is safer to pass to memset() directly. Signed-off-by: NChuck Lever <chuck.lever@oracle.com> Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
-
- 29 3月, 2009 3 次提交
-
-
由 Chuck Lever 提交于
The sv_family field is going away. Pass a protocol family argument to svc_create_xprt() instead of extracting the family from the passed-in svc_serv struct. Again, as this is a listener socket and not an address, we make this new argument an "int" protocol family, instead of an "sa_family_t." Signed-off-by: NChuck Lever <chuck.lever@oracle.com> Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
-
由 Chuck Lever 提交于
Clean up: add documentating comment and use appropriate data types for svc_find_xprt()'s arguments. This also eliminates a mixed sign comparison: @port was an int, while the return value of svc_xprt_local_port() is an unsigned short. Signed-off-by: NChuck Lever <chuck.lever@oracle.com> Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
-
由 Chuck Lever 提交于
Clean up: Enable the use of const arguments in higher level svc_ APIs by adding const to the arguments of the helper functions in svc_xprt.h Signed-off-by: NChuck Lever <chuck.lever@oracle.com> Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
-
- 19 3月, 2009 1 次提交
-
-
由 Chuck Lever 提交于
Clean up: Enable the use of const arguments in higher level svc_ APIs by adding const to the arguments of the helper functions in svc_xprt.h Signed-off-by: NChuck Lever <chuck.lever@oracle.com> Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
-
- 31 10月, 2008 1 次提交
-
-
由 Harvey Harrison 提交于
Using NIPQUAD() with NIPQUAD_FMT, %d.%d.%d.%d or %u.%u.%u.%u can be replaced with %pI4 Signed-off-by: NHarvey Harrison <harvey.harrison@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 30 10月, 2008 1 次提交
-
-
由 Harvey Harrison 提交于
Signed-off-by: NHarvey Harrison <harvey.harrison@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 29 10月, 2008 1 次提交
-
-
由 Harvey Harrison 提交于
Signed-off-by: NHarvey Harrison <harvey.harrison@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 02 2月, 2008 10 次提交
-
-
由 Tom Tucker 提交于
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: NTom Tucker <tom@opengridcomputing.com> Acked-by: NNeil Brown <neilb@suse.de> Reviewed-by: NChuck Lever <chuck.lever@oracle.com> Reviewed-by: NGreg Banks <gnb@sgi.com> Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
-
由 Tom Tucker 提交于
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: NTom Tucker <tom@opengridcomputing.com> Acked-by: NNeil Brown <neilb@suse.de> Reviewed-by: NChuck Lever <chuck.lever@oracle.com> Reviewed-by: NGreg Banks <gnb@sgi.com> Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
-
由 Tom Tucker 提交于
Add a file that when read lists the set of registered svc transports. Signed-off-by: NTom Tucker <tom@opengridcomputing.com> Acked-by: NNeil Brown <neilb@suse.de> Reviewed-by: NChuck Lever <chuck.lever@oracle.com> Reviewed-by: NGreg Banks <gnb@sgi.com> Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
-
由 Tom Tucker 提交于
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: NTom Tucker <tom@opengridcomputing.com> Acked-by: NNeil Brown <neilb@suse.de> Reviewed-by: NChuck Lever <chuck.lever@oracle.com> Reviewed-by: NGreg Banks <gnb@sgi.com> Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
-
由 Tom Tucker 提交于
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: NTom Tucker <tom@opengridcomputing.com> Acked-by: NNeil Brown <neilb@suse.de> Reviewed-by: NChuck Lever <chuck.lever@oracle.com> Reviewed-by: NGreg Banks <gnb@sgi.com> Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
-
由 Tom Tucker 提交于
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: NTom Tucker <tom@opengridcomputing.com> Acked-by: NNeil Brown <neilb@suse.de> Reviewed-by: NChuck Lever <chuck.lever@oracle.com> Reviewed-by: NGreg Banks <gnb@sgi.com> Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
-
由 Tom Tucker 提交于
Move the authinfo cache to svc_xprt. This allows both the TCP and RDMA transports to share this logic. A flag bit is used to determine if auth information is to be cached or not. Previously, this code looked at the transport protocol. I've also changed the spin_lock/unlock logic so that a lock is not taken for transports that are not caching auth info. Signed-off-by: NTom Tucker <tom@opengridcomputing.com> Acked-by: NNeil Brown <neilb@suse.de> Reviewed-by: NChuck Lever <chuck.lever@oracle.com> Reviewed-by: NGreg Banks <gnb@sgi.com> Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
-
由 Tom Tucker 提交于
All fields touched by svc_sock_received are now transport independent. Change it to use svc_xprt directly. This function is called from transport dependent code, so export it. Update the comment to clearly state the rules for calling this function. Signed-off-by: NTom Tucker <tom@opengridcomputing.com> Acked-by: NNeil Brown <neilb@suse.de> Reviewed-by: NChuck Lever <chuck.lever@oracle.com> Reviewed-by: NGreg Banks <gnb@sgi.com> Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
-
由 Tom Tucker 提交于
Move the sk_mutex field to the transport independent svc_xprt structure. Now all the fields that svc_send touches are transport neutral. Change the svc_send function to use the transport independent svc_xprt directly instead of the transport dependent svc_sock structure. Signed-off-by: NTom Tucker <tom@opengridcomputing.com> Acked-by: NNeil Brown <neilb@suse.de> Reviewed-by: NChuck Lever <chuck.lever@oracle.com> Reviewed-by: NGreg Banks <gnb@sgi.com> Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
-
由 Tom Tucker 提交于
This functionally trivial patch moves the sk_reserved field to the transport independent svc_xprt structure. Signed-off-by: NTom Tucker <tom@opengridcomputing.com> Acked-by: NNeil Brown <neilb@suse.de> Reviewed-by: NChuck Lever <chuck.lever@oracle.com> Reviewed-by: NGreg Banks <gnb@sgi.com> Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
-