Commit 12444809 authored by Talpey, Thomas's avatar Talpey, Thomas Committed by Trond Myklebust

SUNRPC: add EXPORT_SYMBOL_GPL for generic transport functions

SUNRPC: add EXPORT_SYMBOL_GPL for generic transport functions

As a preface to allowing arbitrary transport modules to be loaded
dynamically, add EXPORT_SYMBOL_GPL for all generic transport functions
that a transport implementation might want to use.
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Acked-by: default avatarTom Talpey <tmt@netapp.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 4f22ccc3
...@@ -415,6 +415,7 @@ void rpcb_getport_async(struct rpc_task *task) ...@@ -415,6 +415,7 @@ void rpcb_getport_async(struct rpc_task *task)
bailout_nowake: bailout_nowake:
task->tk_status = status; task->tk_status = status;
} }
EXPORT_SYMBOL_GPL(rpcb_getport_async);
/* /*
* Rpcbind child task calls this callback via tk_exit. * Rpcbind child task calls this callback via tk_exit.
......
...@@ -777,6 +777,7 @@ void *rpc_malloc(struct rpc_task *task, size_t size) ...@@ -777,6 +777,7 @@ void *rpc_malloc(struct rpc_task *task, size_t size)
task->tk_pid, size, buf); task->tk_pid, size, buf);
return &buf->data; return &buf->data;
} }
EXPORT_SYMBOL_GPL(rpc_malloc);
/** /**
* rpc_free - free buffer allocated via rpc_malloc * rpc_free - free buffer allocated via rpc_malloc
...@@ -802,6 +803,7 @@ void rpc_free(void *buffer) ...@@ -802,6 +803,7 @@ void rpc_free(void *buffer)
else else
kfree(buf); kfree(buf);
} }
EXPORT_SYMBOL_GPL(rpc_free);
/* /*
* Creation and deletion of RPC task structures * Creation and deletion of RPC task structures
......
...@@ -34,6 +34,7 @@ size_t xdr_skb_read_bits(struct xdr_skb_reader *desc, void *to, size_t len) ...@@ -34,6 +34,7 @@ size_t xdr_skb_read_bits(struct xdr_skb_reader *desc, void *to, size_t len)
desc->offset += len; desc->offset += len;
return len; return len;
} }
EXPORT_SYMBOL_GPL(xdr_skb_read_bits);
/** /**
* xdr_skb_read_and_csum_bits - copy and checksum from skb to buffer * xdr_skb_read_and_csum_bits - copy and checksum from skb to buffer
...@@ -137,6 +138,7 @@ ssize_t xdr_partial_copy_from_skb(struct xdr_buf *xdr, unsigned int base, struct ...@@ -137,6 +138,7 @@ ssize_t xdr_partial_copy_from_skb(struct xdr_buf *xdr, unsigned int base, struct
out: out:
return copied; return copied;
} }
EXPORT_SYMBOL_GPL(xdr_partial_copy_from_skb);
/** /**
* csum_partial_copy_to_xdr - checksum and copy data * csum_partial_copy_to_xdr - checksum and copy data
...@@ -179,3 +181,4 @@ int csum_partial_copy_to_xdr(struct xdr_buf *xdr, struct sk_buff *skb) ...@@ -179,3 +181,4 @@ int csum_partial_copy_to_xdr(struct xdr_buf *xdr, struct sk_buff *skb)
return -1; return -1;
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(csum_partial_copy_to_xdr);
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include <linux/types.h> #include <linux/types.h>
#include <linux/unistd.h> #include <linux/unistd.h>
#include <linux/module.h>
#include <linux/sunrpc/clnt.h> #include <linux/sunrpc/clnt.h>
...@@ -40,6 +41,7 @@ rpc_init_rtt(struct rpc_rtt *rt, unsigned long timeo) ...@@ -40,6 +41,7 @@ rpc_init_rtt(struct rpc_rtt *rt, unsigned long timeo)
rt->ntimeouts[i] = 0; rt->ntimeouts[i] = 0;
} }
} }
EXPORT_SYMBOL_GPL(rpc_init_rtt);
/* /*
* NB: When computing the smoothed RTT and standard deviation, * NB: When computing the smoothed RTT and standard deviation,
...@@ -75,6 +77,7 @@ rpc_update_rtt(struct rpc_rtt *rt, unsigned timer, long m) ...@@ -75,6 +77,7 @@ rpc_update_rtt(struct rpc_rtt *rt, unsigned timer, long m)
if (*sdrtt < RPC_RTO_MIN) if (*sdrtt < RPC_RTO_MIN)
*sdrtt = RPC_RTO_MIN; *sdrtt = RPC_RTO_MIN;
} }
EXPORT_SYMBOL_GPL(rpc_update_rtt);
/* /*
* Estimate rto for an nfs rpc sent via. an unreliable datagram. * Estimate rto for an nfs rpc sent via. an unreliable datagram.
...@@ -103,3 +106,4 @@ rpc_calc_rto(struct rpc_rtt *rt, unsigned timer) ...@@ -103,3 +106,4 @@ rpc_calc_rto(struct rpc_rtt *rt, unsigned timer)
return res; return res;
} }
EXPORT_SYMBOL_GPL(rpc_calc_rto);
...@@ -118,6 +118,7 @@ int xprt_reserve_xprt(struct rpc_task *task) ...@@ -118,6 +118,7 @@ int xprt_reserve_xprt(struct rpc_task *task)
rpc_sleep_on(&xprt->sending, task, NULL, NULL); rpc_sleep_on(&xprt->sending, task, NULL, NULL);
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(xprt_reserve_xprt);
static void xprt_clear_locked(struct rpc_xprt *xprt) static void xprt_clear_locked(struct rpc_xprt *xprt)
{ {
...@@ -167,6 +168,7 @@ int xprt_reserve_xprt_cong(struct rpc_task *task) ...@@ -167,6 +168,7 @@ int xprt_reserve_xprt_cong(struct rpc_task *task)
rpc_sleep_on(&xprt->sending, task, NULL, NULL); rpc_sleep_on(&xprt->sending, task, NULL, NULL);
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(xprt_reserve_xprt_cong);
static inline int xprt_lock_write(struct rpc_xprt *xprt, struct rpc_task *task) static inline int xprt_lock_write(struct rpc_xprt *xprt, struct rpc_task *task)
{ {
...@@ -246,6 +248,7 @@ void xprt_release_xprt(struct rpc_xprt *xprt, struct rpc_task *task) ...@@ -246,6 +248,7 @@ void xprt_release_xprt(struct rpc_xprt *xprt, struct rpc_task *task)
__xprt_lock_write_next(xprt); __xprt_lock_write_next(xprt);
} }
} }
EXPORT_SYMBOL_GPL(xprt_release_xprt);
/** /**
* xprt_release_xprt_cong - allow other requests to use a transport * xprt_release_xprt_cong - allow other requests to use a transport
...@@ -262,6 +265,7 @@ void xprt_release_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task) ...@@ -262,6 +265,7 @@ void xprt_release_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task)
__xprt_lock_write_next_cong(xprt); __xprt_lock_write_next_cong(xprt);
} }
} }
EXPORT_SYMBOL_GPL(xprt_release_xprt_cong);
static inline void xprt_release_write(struct rpc_xprt *xprt, struct rpc_task *task) static inline void xprt_release_write(struct rpc_xprt *xprt, struct rpc_task *task)
{ {
...@@ -314,6 +318,7 @@ void xprt_release_rqst_cong(struct rpc_task *task) ...@@ -314,6 +318,7 @@ void xprt_release_rqst_cong(struct rpc_task *task)
{ {
__xprt_put_cong(task->tk_xprt, task->tk_rqstp); __xprt_put_cong(task->tk_xprt, task->tk_rqstp);
} }
EXPORT_SYMBOL_GPL(xprt_release_rqst_cong);
/** /**
* xprt_adjust_cwnd - adjust transport congestion window * xprt_adjust_cwnd - adjust transport congestion window
...@@ -345,6 +350,7 @@ void xprt_adjust_cwnd(struct rpc_task *task, int result) ...@@ -345,6 +350,7 @@ void xprt_adjust_cwnd(struct rpc_task *task, int result)
xprt->cwnd = cwnd; xprt->cwnd = cwnd;
__xprt_put_cong(xprt, req); __xprt_put_cong(xprt, req);
} }
EXPORT_SYMBOL_GPL(xprt_adjust_cwnd);
/** /**
* xprt_wake_pending_tasks - wake all tasks on a transport's pending queue * xprt_wake_pending_tasks - wake all tasks on a transport's pending queue
...@@ -359,6 +365,7 @@ void xprt_wake_pending_tasks(struct rpc_xprt *xprt, int status) ...@@ -359,6 +365,7 @@ void xprt_wake_pending_tasks(struct rpc_xprt *xprt, int status)
else else
rpc_wake_up(&xprt->pending); rpc_wake_up(&xprt->pending);
} }
EXPORT_SYMBOL_GPL(xprt_wake_pending_tasks);
/** /**
* xprt_wait_for_buffer_space - wait for transport output buffer to clear * xprt_wait_for_buffer_space - wait for transport output buffer to clear
...@@ -373,6 +380,7 @@ void xprt_wait_for_buffer_space(struct rpc_task *task) ...@@ -373,6 +380,7 @@ void xprt_wait_for_buffer_space(struct rpc_task *task)
task->tk_timeout = req->rq_timeout; task->tk_timeout = req->rq_timeout;
rpc_sleep_on(&xprt->pending, task, NULL, NULL); rpc_sleep_on(&xprt->pending, task, NULL, NULL);
} }
EXPORT_SYMBOL_GPL(xprt_wait_for_buffer_space);
/** /**
* xprt_write_space - wake the task waiting for transport output buffer space * xprt_write_space - wake the task waiting for transport output buffer space
...@@ -393,6 +401,7 @@ void xprt_write_space(struct rpc_xprt *xprt) ...@@ -393,6 +401,7 @@ void xprt_write_space(struct rpc_xprt *xprt)
} }
spin_unlock_bh(&xprt->transport_lock); spin_unlock_bh(&xprt->transport_lock);
} }
EXPORT_SYMBOL_GPL(xprt_write_space);
/** /**
* xprt_set_retrans_timeout_def - set a request's retransmit timeout * xprt_set_retrans_timeout_def - set a request's retransmit timeout
...@@ -406,6 +415,7 @@ void xprt_set_retrans_timeout_def(struct rpc_task *task) ...@@ -406,6 +415,7 @@ void xprt_set_retrans_timeout_def(struct rpc_task *task)
{ {
task->tk_timeout = task->tk_rqstp->rq_timeout; task->tk_timeout = task->tk_rqstp->rq_timeout;
} }
EXPORT_SYMBOL_GPL(xprt_set_retrans_timeout_def);
/* /*
* xprt_set_retrans_timeout_rtt - set a request's retransmit timeout * xprt_set_retrans_timeout_rtt - set a request's retransmit timeout
...@@ -425,6 +435,7 @@ void xprt_set_retrans_timeout_rtt(struct rpc_task *task) ...@@ -425,6 +435,7 @@ void xprt_set_retrans_timeout_rtt(struct rpc_task *task)
if (task->tk_timeout > max_timeout || task->tk_timeout == 0) if (task->tk_timeout > max_timeout || task->tk_timeout == 0)
task->tk_timeout = max_timeout; task->tk_timeout = max_timeout;
} }
EXPORT_SYMBOL_GPL(xprt_set_retrans_timeout_rtt);
static void xprt_reset_majortimeo(struct rpc_rqst *req) static void xprt_reset_majortimeo(struct rpc_rqst *req)
{ {
...@@ -500,6 +511,7 @@ void xprt_disconnect(struct rpc_xprt *xprt) ...@@ -500,6 +511,7 @@ void xprt_disconnect(struct rpc_xprt *xprt)
xprt_wake_pending_tasks(xprt, -ENOTCONN); xprt_wake_pending_tasks(xprt, -ENOTCONN);
spin_unlock_bh(&xprt->transport_lock); spin_unlock_bh(&xprt->transport_lock);
} }
EXPORT_SYMBOL_GPL(xprt_disconnect);
static void static void
xprt_init_autodisconnect(unsigned long data) xprt_init_autodisconnect(unsigned long data)
...@@ -610,6 +622,7 @@ struct rpc_rqst *xprt_lookup_rqst(struct rpc_xprt *xprt, __be32 xid) ...@@ -610,6 +622,7 @@ struct rpc_rqst *xprt_lookup_rqst(struct rpc_xprt *xprt, __be32 xid)
xprt->stat.bad_xids++; xprt->stat.bad_xids++;
return NULL; return NULL;
} }
EXPORT_SYMBOL_GPL(xprt_lookup_rqst);
/** /**
* xprt_update_rtt - update an RPC client's RTT state after receiving a reply * xprt_update_rtt - update an RPC client's RTT state after receiving a reply
...@@ -629,6 +642,7 @@ void xprt_update_rtt(struct rpc_task *task) ...@@ -629,6 +642,7 @@ void xprt_update_rtt(struct rpc_task *task)
rpc_set_timeo(rtt, timer, req->rq_ntrans - 1); rpc_set_timeo(rtt, timer, req->rq_ntrans - 1);
} }
} }
EXPORT_SYMBOL_GPL(xprt_update_rtt);
/** /**
* xprt_complete_rqst - called when reply processing is complete * xprt_complete_rqst - called when reply processing is complete
...@@ -653,6 +667,7 @@ void xprt_complete_rqst(struct rpc_task *task, int copied) ...@@ -653,6 +667,7 @@ void xprt_complete_rqst(struct rpc_task *task, int copied)
req->rq_received = req->rq_private_buf.len = copied; req->rq_received = req->rq_private_buf.len = copied;
rpc_wake_up_task(task); rpc_wake_up_task(task);
} }
EXPORT_SYMBOL_GPL(xprt_complete_rqst);
static void xprt_timer(struct rpc_task *task) static void xprt_timer(struct rpc_task *task)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment