All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC, PATCH 7/14] knfsd: export svc_sock_enqueue, svc_sock_received
@ 2007-05-16 19:24 Greg Banks
  2007-05-16 21:17 ` J. Bruce Fields
  2007-05-17 10:13 ` Neil Brown
  0 siblings, 2 replies; 6+ messages in thread
From: Greg Banks @ 2007-05-16 19:24 UTC (permalink / raw)
  To: Tom Tucker; +Cc: Linux NFS Mailing List, Thomas Talpey, Peter Leckie


Export svc_sock_enqueue() and svc_sock_received() so they
can be used by sunrpc server transport implementations
(even future modular ones).

Signed-off-by: Greg Banks <gnb@melbourne.sgi.com>
Signed-off-by: Peter Leckie <pleckie@melbourne.sgi.com>
---

 include/linux/sunrpc/svcsock.h |    2 ++
 net/sunrpc/sunrpc_syms.c       |    2 ++
 net/sunrpc/svcsock.c           |    4 ++--
 3 files changed, 6 insertions(+), 2 deletions(-)

Index: linux/include/linux/sunrpc/svcsock.h
===================================================================
--- linux.orig/include/linux/sunrpc/svcsock.h	2007-05-17 02:04:02.007208187 +1000
+++ linux/include/linux/sunrpc/svcsock.h	2007-05-17 02:39:51.367033242 +1000
@@ -114,6 +114,8 @@ int		svc_addsock(struct svc_serv *serv,
 			    int fd,
 			    char *name_return,
 			    int *proto);
+void		svc_sock_enqueue(struct svc_sock *svsk);
+void		svc_sock_received(struct svc_sock *svsk);
 
 /*
  * svc_makesock socket characteristics
Index: linux/net/sunrpc/sunrpc_syms.c
===================================================================
--- linux.orig/net/sunrpc/sunrpc_syms.c	2007-04-26 13:08:32.000000000 +1000
+++ linux/net/sunrpc/sunrpc_syms.c	2007-05-17 02:09:47.762054713 +1000
@@ -77,6 +77,8 @@ EXPORT_SYMBOL(svc_process);
 EXPORT_SYMBOL(svc_recv);
 EXPORT_SYMBOL(svc_wake_up);
 EXPORT_SYMBOL(svc_makesock);
+EXPORT_SYMBOL_GPL(svc_sock_enqueue);
+EXPORT_SYMBOL_GPL(svc_sock_received);
 EXPORT_SYMBOL(svc_reserve);
 EXPORT_SYMBOL(svc_auth_register);
 EXPORT_SYMBOL(auth_domain_lookup);
Index: linux/net/sunrpc/svcsock.c
===================================================================
--- linux.orig/net/sunrpc/svcsock.c	2007-05-17 01:28:25.221366963 +1000
+++ linux/net/sunrpc/svcsock.c	2007-05-17 02:40:30.597956980 +1000
@@ -208,7 +208,7 @@ svc_release_skb(struct svc_rqst *rqstp)
  * processes, wake 'em up.
  *
  */
-static void
+void
 svc_sock_enqueue(struct svc_sock *svsk)
 {
 	struct svc_serv	*serv = svsk->sk_server;
@@ -316,7 +316,7 @@ svc_sock_dequeue(struct svc_pool *pool)
  * Note: SK_DATA only gets cleared when a read-attempt finds
  * no (or insufficient) data.
  */
-static inline void
+void
 svc_sock_received(struct svc_sock *svsk)
 {
 	svsk->sk_pool = NULL;
-- 
Greg Banks, R&D Software Engineer, SGI Australian Software Group.
Apparently, I'm Bedevere.  Which MPHG character are you?
I don't speak for SGI.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFC, PATCH 7/14] knfsd: export svc_sock_enqueue, svc_sock_received
  2007-05-16 19:24 [RFC, PATCH 7/14] knfsd: export svc_sock_enqueue, svc_sock_received Greg Banks
@ 2007-05-16 21:17 ` J. Bruce Fields
  2007-05-17  7:45   ` Greg Banks
  2007-05-17 10:13 ` Neil Brown
  1 sibling, 1 reply; 6+ messages in thread
From: J. Bruce Fields @ 2007-05-16 21:17 UTC (permalink / raw)
  To: Greg Banks; +Cc: Thomas Talpey, Linux NFS Mailing List, Peter Leckie

On Thu, May 17, 2007 at 05:24:25AM +1000, Greg Banks wrote:
> 
> Export svc_sock_enqueue() and svc_sock_received() so they
> can be used by sunrpc server transport implementations
> (even future modular ones).

Have you thought about how you'll handle the reference counting in the
modular case?

--b.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFC, PATCH 7/14] knfsd: export svc_sock_enqueue, svc_sock_received
  2007-05-16 21:17 ` J. Bruce Fields
@ 2007-05-17  7:45   ` Greg Banks
  2007-05-17 12:23     ` Talpey, Thomas
  0 siblings, 1 reply; 6+ messages in thread
From: Greg Banks @ 2007-05-17  7:45 UTC (permalink / raw)
  To: J. Bruce Fields
  Cc: Thomas Talpey, Linux NFS Mailing List, Greg Banks, Peter Leckie

On Wed, May 16, 2007 at 05:17:03PM -0400, J. Bruce Fields wrote:
> On Thu, May 17, 2007 at 05:24:25AM +1000, Greg Banks wrote:
> > 
> > Export svc_sock_enqueue() and svc_sock_received() so they
> > can be used by sunrpc server transport implementations
> > (even future modular ones).
> 
> Have you thought about how you'll handle the reference counting in the
> modular case?

Yes, but only thought not experimented nor discussed.  I was planning
to add a new file to /proc/fs/nfsd roughly analagous to the ports and
versions files, where the init script could write a string to indicate
which transports are enabled or disabled.  Transports would be managed
in a global list of structures analagous to struct xprt_type in Chuck's
client patches.  Enabling from userspace would search this list, try
a module load on failure, and bump the refcount.  Disabling would
shut down all svc_sock belonging to the transport type, then drop
the module refcount.  Neither traffic from clients nor creation of
svc_socks would affect the module refcount.

Greg.
-- 
Greg Banks, R&D Software Engineer, SGI Australian Software Group.
Apparently, I'm Bedevere.  Which MPHG character are you?
I don't speak for SGI.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFC, PATCH 7/14] knfsd: export svc_sock_enqueue, svc_sock_received
  2007-05-16 19:24 [RFC, PATCH 7/14] knfsd: export svc_sock_enqueue, svc_sock_received Greg Banks
  2007-05-16 21:17 ` J. Bruce Fields
@ 2007-05-17 10:13 ` Neil Brown
  2007-05-18  8:58   ` Greg Banks
  1 sibling, 1 reply; 6+ messages in thread
From: Neil Brown @ 2007-05-17 10:13 UTC (permalink / raw)
  To: Greg Banks; +Cc: Thomas Talpey, Linux NFS Mailing List, Peter Leckie

On Thursday May 17, gnb@sgi.com wrote:
> Index: linux/net/sunrpc/sunrpc_syms.c
> ===================================================================
> --- linux.orig/net/sunrpc/sunrpc_syms.c	2007-04-26 13:08:32.000000000 +1000
> +++ linux/net/sunrpc/sunrpc_syms.c	2007-05-17 02:09:47.762054713 +1000
> @@ -77,6 +77,8 @@ EXPORT_SYMBOL(svc_process);
>  EXPORT_SYMBOL(svc_recv);
>  EXPORT_SYMBOL(svc_wake_up);
>  EXPORT_SYMBOL(svc_makesock);
> +EXPORT_SYMBOL_GPL(svc_sock_enqueue);
> +EXPORT_SYMBOL_GPL(svc_sock_received);
>  EXPORT_SYMBOL(svc_reserve);
>  EXPORT_SYMBOL(svc_auth_register);
>  EXPORT_SYMBOL(auth_domain_lookup);

Can we please put new EXPORT_SYMBOLS near the function rather than in
this file?  And if anyone wants to move them all out, I'm fine with
that.

NeilBrown

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFC, PATCH 7/14] knfsd: export svc_sock_enqueue, svc_sock_received
  2007-05-17  7:45   ` Greg Banks
@ 2007-05-17 12:23     ` Talpey, Thomas
  0 siblings, 0 replies; 6+ messages in thread
From: Talpey, Thomas @ 2007-05-17 12:23 UTC (permalink / raw)
  To: Greg Banks; +Cc: nfs

At 03:45 AM 5/17/2007, Greg Banks wrote:
> I was planning
>to add a new file to /proc/fs/nfsd roughly analagous to the ports and
>versions files, where the init script could write a string to indicate
>which transports are enabled or disabled.  Transports would be managed
>in a global list of structures analagous to struct xprt_type in Chuck's
>client patches.

I like this, it seems nearly the same as the /proc/fs/nfsd/thread node
that's in there now. A new /proc/fs/nfsd/protocols node makes sense
to me.

Another option might be to support switches to the nfsd command,
like other os's do (nfsd -u). This makes a lot of sense if the current
#ifdef's to enable nfsd's protocols is retained. If module loading is
supported, I like the dynamic /proc aproach better.

Tom.


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFC, PATCH 7/14] knfsd: export svc_sock_enqueue, svc_sock_received
  2007-05-17 10:13 ` Neil Brown
@ 2007-05-18  8:58   ` Greg Banks
  0 siblings, 0 replies; 6+ messages in thread
From: Greg Banks @ 2007-05-18  8:58 UTC (permalink / raw)
  To: Neil Brown; +Cc: Thomas Talpey, Linux NFS Mailing List, Peter Leckie

On Thu, May 17, 2007 at 08:13:59PM +1000, Neil Brown wrote:
> On Thursday May 17, gnb@sgi.com wrote:
> > Index: linux/net/sunrpc/sunrpc_syms.c
> > ===================================================================
> > --- linux.orig/net/sunrpc/sunrpc_syms.c	2007-04-26 13:08:32.000000000 +1000
> > +++ linux/net/sunrpc/sunrpc_syms.c	2007-05-17 02:09:47.762054713 +1000
> > @@ -77,6 +77,8 @@ EXPORT_SYMBOL(svc_process);
> >  EXPORT_SYMBOL(svc_recv);
> >  EXPORT_SYMBOL(svc_wake_up);
> >  EXPORT_SYMBOL(svc_makesock);
> > +EXPORT_SYMBOL_GPL(svc_sock_enqueue);
> > +EXPORT_SYMBOL_GPL(svc_sock_received);
> >  EXPORT_SYMBOL(svc_reserve);
> >  EXPORT_SYMBOL(svc_auth_register);
> >  EXPORT_SYMBOL(auth_domain_lookup);
> 
> Can we please put new EXPORT_SYMBOLS near the function rather than in
> this file?

Fixed, in all 3 patches which did this.

>  And if anyone wants to move them all out, I'm fine with
> that.
> 

There won't be much left of sunrpc_syms.c ;-)

Greg.
-- 
Greg Banks, R&D Software Engineer, SGI Australian Software Group.
Apparently, I'm Bedevere.  Which MPHG character are you?
I don't speak for SGI.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-05-18  8:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-16 19:24 [RFC, PATCH 7/14] knfsd: export svc_sock_enqueue, svc_sock_received Greg Banks
2007-05-16 21:17 ` J. Bruce Fields
2007-05-17  7:45   ` Greg Banks
2007-05-17 12:23     ` Talpey, Thomas
2007-05-17 10:13 ` Neil Brown
2007-05-18  8:58   ` Greg Banks

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.