From e63053803dca86b4283b71bc4ef4cb180ec72d89 Mon Sep 17 00:00:00 2001 From: Shehjar Tikoo Date: Wed, 31 Mar 2010 07:27:04 +0000 Subject: nfs: Add MOUNTv3 protocol support Signed-off-by: Shehjar Tikoo Signed-off-by: Anand V. Avati BUG: 399 (NFS translator with Mount v3 and NFS v3 support) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=399 --- xlators/nfs/server/src/nfs.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'xlators/nfs/server/src/nfs.c') diff --git a/xlators/nfs/server/src/nfs.c b/xlators/nfs/server/src/nfs.c index ca6fda69c29..74937903612 100644 --- a/xlators/nfs/server/src/nfs.c +++ b/xlators/nfs/server/src/nfs.c @@ -36,6 +36,7 @@ #include "logging.h" #include "nfs-fops.h" #include "inode.h" +#include "mount3.h" /* Every NFS version must call this function with the init function * for its particular version. @@ -134,8 +135,26 @@ err: int nfs_add_all_initiators (struct nfs_state *nfs) { + int ret = 0; + /* Add the initializers for all versions. */ - return 0; + ret = nfs_add_initer (&nfs->versions, mnt3svc_init); + if (ret == -1) { + gf_log (GF_NFS, GF_LOG_ERROR, "Failed to add protocol" + " initializer"); + goto ret; + } + + ret = nfs_add_initer (&nfs->versions, mnt1svc_init); + if (ret == -1) { + gf_log (GF_NFS, GF_LOG_ERROR, "Failed to add protocol" + " initializer"); + goto ret; + } + + ret = 0; +ret: + return ret; } -- cgit