From: Steve Dickson <SteveD@redhat.com> Date: Sat, 19 Jan 2008 06:39:32 -0500 Subject: [nfs] acl support broken due to typo Message-id: 4791E174.2060008@RedHat.com O-Subject: Re: [RHEL5.2] [PATCH] NFSD: acl support broken due to typo Bugzilla: 429109 While debugging some other code, I kept noticing this very annoying "svc: unknown version (3)" message being logged on a RHEL5.2 (2.6.18-69) server when an F9 client did a normal everyday nfsv3 mount. I turns out that due to a typo in nfsd_vers() (the routine used by rpc.nfsd to set the protocol version(s) in NFS server) the version ACL code was not being enabled, which was the cause of the annoying messages. So the attached patch fixes the typo that which enables the ACL processing plus it added more information to the annoying message to hopefully make it more useful. Acked-by: Jeff Layton <jlayton@redhat.com> diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c index f908702..9a6e06a 100644 --- a/fs/nfsd/nfssvc.c +++ b/fs/nfsd/nfssvc.c @@ -85,7 +85,7 @@ static struct svc_program nfsd_acl_program = { .pg_prog = NFS_ACL_PROGRAM, .pg_nvers = NFSD_ACL_NRVERS, .pg_vers = nfsd_acl_versions, - .pg_name = "nfsd", + .pg_name = "nfsacl", .pg_class = "nfsd", .pg_stats = &nfsd_acl_svcstats, .pg_authenticate = &svc_set_client, @@ -133,16 +133,16 @@ int nfsd_vers(int vers, enum vers_op change) switch(change) { case NFSD_SET: nfsd_versions[vers] = nfsd_version[vers]; - break; #if defined(CONFIG_NFSD_V2_ACL) || defined(CONFIG_NFSD_V3_ACL) if (vers < NFSD_ACL_NRVERS) - nfsd_acl_version[vers] = nfsd_acl_version[vers]; + nfsd_acl_versions[vers] = nfsd_acl_version[vers]; #endif + break; case NFSD_CLEAR: nfsd_versions[vers] = NULL; #if defined(CONFIG_NFSD_V2_ACL) || defined(CONFIG_NFSD_V3_ACL) if (vers < NFSD_ACL_NRVERS) - nfsd_acl_version[vers] = NULL; + nfsd_acl_versions[vers] = NULL; #endif break; case NFSD_TEST: diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index 3153395..7ee1fae 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c @@ -471,7 +471,8 @@ err_bad_prog: err_bad_vers: #ifdef RPC_PARANOIA - printk("svc: unknown version (%d)\n", vers); + printk("svc: unknown version (%d for prog %d %s)\n", + vers, prog, progp->pg_name); #endif serv->sv_stats->rpcbadfmt++; svc_putu32(resv, rpc_prog_mismatch);