From 826bf14de9eafe1cb67c45f25a9cfb236649801a Mon Sep 17 00:00:00 2001 From: Gaurav Date: Thu, 3 Mar 2011 02:04:51 +0000 Subject: NFS : Check for duplicate entries while filling up child_up array. Signed-off-by: Gaurav Signed-off-by: Anand V. Avati BUG: 2483 (Showmount output is not consistent with exported volumes.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2483 --- xlators/nfs/server/src/nfs.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/xlators/nfs/server/src/nfs.c b/xlators/nfs/server/src/nfs.c index ad66410edfe..8df7c13321c 100644 --- a/xlators/nfs/server/src/nfs.c +++ b/xlators/nfs/server/src/nfs.c @@ -205,6 +205,13 @@ nfs_subvolume_set_started (struct nfs_state *nfs, xlator_t *xl) LOCK (&nfs->svinitlock); { for (;x < nfs->allsubvols; ++x) { + if (nfs->initedxl[x] == xl) { + gf_log (GF_NFS, GF_LOG_DEBUG, + "Volume already started %s", + xl->name); + break; + } + if (nfs->initedxl[x] == NULL) { nfs->initedxl[x] = xl; ++nfs->upsubvols; -- cgit