]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
nfs41: add support for callback with RPC version number 4
authorAlexandros Batsakis <batsakis@netapp.com>
Sat, 5 Dec 2009 18:19:01 +0000 (13:19 -0500)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Sat, 5 Dec 2009 18:19:01 +0000 (13:19 -0500)
The NFSv4.1 spec-29 (18.36.3) says that the server MUST use an ONC RPC
(program) version number equal to 4 in callbacks sent to the client.
For now we allow both versions 1 and 4.

Signed-off-by: Alexandros Batsakis <batsakis@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/callback.c
fs/nfs/callback_xdr.c
fs/nfs/internal.h
fs/nfs/nfs4_fs.h

index e66ec5d169f752b79a106c227e93abac9c994011..73ab220354dfc6c2a046535ec959707779ed56ed 100644 (file)
@@ -385,6 +385,7 @@ static int nfs_callback_authenticate(struct svc_rqst *rqstp)
  */
 static struct svc_version *nfs4_callback_version[] = {
        [1] = &nfs4_callback_version1,
+       [4] = &nfs4_callback_version4,
 };
 
 static struct svc_stat nfs4_callback_stats;
index 76b0aa0f73bfca33ac620c6569cbe926f099f901..0fda5e66241dd971dd7681d19acd8af0c896b445 100644 (file)
@@ -718,3 +718,10 @@ struct svc_version nfs4_callback_version1 = {
        .vs_dispatch = NULL,
 };
 
+struct svc_version nfs4_callback_version4 = {
+       .vs_vers = 4,
+       .vs_nproc = ARRAY_SIZE(nfs4_callback_procedures1),
+       .vs_proc = nfs4_callback_procedures1,
+       .vs_xdrsize = NFS4_CALLBACK_XDRSIZE,
+       .vs_dispatch = NULL,
+};
index a6f7b6cbfd09b9f6296f0a02d38c449481c35148..7b890ba37fa2ff8833e0bf097a6fa0ae5f15694f 100644 (file)
@@ -156,6 +156,7 @@ struct vfsmount *nfs_do_refmount(const struct vfsmount *mnt_parent, struct dentr
 
 /* callback_xdr.c */
 extern struct svc_version nfs4_callback_version1;
+extern struct svc_version nfs4_callback_version4;
 
 /* pagelist.c */
 extern int __init nfs_init_nfspagecache(void);
index 5c7740178a08635b8d7f8527c3c8f73156716d3a..0d25a82451d9ab1b72d42b789248e2232d9b4a83 100644 (file)
@@ -290,6 +290,7 @@ struct nfs4_mount_data;
 
 /* callback_xdr.c */
 extern struct svc_version nfs4_callback_version1;
+extern struct svc_version nfs4_callback_version4;
 
 #else