* [PATCH 2/11] sunrpc-multiple-programs
@ 2004-04-26 10:28 Andreas Gruenbacher
0 siblings, 0 replies; only message in thread
From: Andreas Gruenbacher @ 2004-04-26 10:28 UTC (permalink / raw)
To: Andrew Morton, lkml
Support multiple program numbers on one RPC transport
The NFS and NFSACL programs run on the same RPC transport. This patch
adds support for this by changing svc_program into a chained list of
programs instead of a single program (on the server side).
Andreas Gruenbacher <agruen@suse.de>, SuSE Labs
Index: linux-2.6.6-rc2/fs/nfsd/nfsproc.c
===================================================================
--- linux-2.6.6-rc2.orig/fs/nfsd/nfsproc.c
+++ linux-2.6.6-rc2/fs/nfsd/nfsproc.c
@@ -588,6 +588,8 @@ nfserrno (int errno)
{ nfserr_jukebox, -ETIMEDOUT },
{ nfserr_dropit, -EAGAIN },
{ nfserr_dropit, -ENOMEM },
+ { nfserr_notsupp, -ENOTSUPP },
+ { nfserr_notsupp, -EOPNOTSUPP },
{ -1, -EIO }
};
int i;
Index: linux-2.6.6-rc2/include/linux/sunrpc/svc.h
===================================================================
--- linux-2.6.6-rc2.orig/include/linux/sunrpc/svc.h
+++ linux-2.6.6-rc2/include/linux/sunrpc/svc.h
@@ -232,9 +232,10 @@ struct svc_deferred_req {
};
/*
- * RPC program
+ * List of RPC programs on the same transport endpoint
*/
struct svc_program {
+ struct svc_program * pg_next; /* other programs (same xprt) */
u32 pg_prog; /* program number */
unsigned int pg_lovers; /* lowest version */
unsigned int pg_hivers; /* lowest version */
Index: linux-2.6.6-rc2/net/sunrpc/svc.c
===================================================================
--- linux-2.6.6-rc2.orig/net/sunrpc/svc.c
+++ linux-2.6.6-rc2/net/sunrpc/svc.c
@@ -326,8 +326,10 @@ svc_process(struct svc_serv *serv, struc
goto sendit;
}
- progp = serv->sv_program;
- if (prog != progp->pg_prog)
+ for (progp = serv->sv_program; progp; progp = progp->pg_next)
+ if (prog == progp->pg_prog)
+ break;
+ if (progp == NULL)
goto err_bad_prog;
if (vers >= progp->pg_nvers ||
@@ -440,7 +442,7 @@ err_bad_auth:
err_bad_prog:
#ifdef RPC_PARANOIA
- if (prog != 100227 || progp->pg_prog != 100003)
+ if (prog != 100227 || serv->sv_program->pg_prog != 100003)
printk("svc: unknown program %d (me %d)\n", prog, progp->pg_prog);
/* else it is just a Solaris client seeing if ACLs are supported */
#endif
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-04-26 10:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-26 10:28 [PATCH 2/11] sunrpc-multiple-programs Andreas Gruenbacher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®