|
|
cb8e9e |
From c9338497aa163a54c32c70869a0035aa875312cc Mon Sep 17 00:00:00 2001
|
|
|
cb8e9e |
From: Anuradha <atalur@redhat.com>
|
|
|
cb8e9e |
Date: Fri, 5 Jun 2015 16:49:14 +0530
|
|
|
cb8e9e |
Subject: [PATCH 250/279] heal : Do not invoke glfs_fini for glfs-heal commands
|
|
|
cb8e9e |
|
|
|
cb8e9e |
backport of http://review.gluster.org/11001 &
|
|
|
cb8e9e |
http://review.gluster.org/11115
|
|
|
cb8e9e |
|
|
|
cb8e9e |
Change-Id: I2fa6789488c4ecebbed049f46c189441fba48535
|
|
|
cb8e9e |
BUG: 1236990
|
|
|
cb8e9e |
Signed-off-by: Anuradha <atalur@redhat.com>
|
|
|
cb8e9e |
Reviewed-on: http://review.gluster.org/11103
|
|
|
cb8e9e |
Tested-by: Gluster Build System <jenkins@build.gluster.com>
|
|
|
cb8e9e |
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
|
|
|
cb8e9e |
Reviewed-on: http://review.gluster.org/11115
|
|
|
cb8e9e |
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
|
|
|
cb8e9e |
Signed-off-by: Anuradha Talur <atalur@redhat.com>
|
|
|
cb8e9e |
Reviewed-on: https://code.engineering.redhat.com/gerrit/51934
|
|
|
cb8e9e |
Reviewed-by: Ravishankar Narayanankutty <ravishankar@redhat.com>
|
|
|
cb8e9e |
Tested-by: Ravishankar Narayanankutty <ravishankar@redhat.com>
|
|
|
cb8e9e |
---
|
|
|
cb8e9e |
heal/src/glfs-heal.c | 20 +++++++++++++++++---
|
|
|
cb8e9e |
1 files changed, 17 insertions(+), 3 deletions(-)
|
|
|
cb8e9e |
|
|
|
cb8e9e |
diff --git a/heal/src/glfs-heal.c b/heal/src/glfs-heal.c
|
|
|
cb8e9e |
index cbdb593..bc76518 100644
|
|
|
cb8e9e |
--- a/heal/src/glfs-heal.c
|
|
|
cb8e9e |
+++ b/heal/src/glfs-heal.c
|
|
|
cb8e9e |
@@ -674,6 +674,21 @@ out:
|
|
|
cb8e9e |
return ret;
|
|
|
cb8e9e |
}
|
|
|
cb8e9e |
|
|
|
cb8e9e |
+static void
|
|
|
cb8e9e |
+cleanup (glfs_t *fs)
|
|
|
cb8e9e |
+{
|
|
|
cb8e9e |
+ if (!fs)
|
|
|
cb8e9e |
+ return;
|
|
|
cb8e9e |
+#if 0
|
|
|
cb8e9e |
+ /* glfs fini path is still racy and crashing the program. Since
|
|
|
cb8e9e |
+ * this program any way has to die, we are not gonna call fini
|
|
|
cb8e9e |
+ * in the released versions. i.e. final builds. For all
|
|
|
cb8e9e |
+ * internal testing lets enable this so that glfs_fini code
|
|
|
cb8e9e |
+ * path becomes stable. */
|
|
|
cb8e9e |
+ glfs_fini (fs);
|
|
|
cb8e9e |
+#endif
|
|
|
cb8e9e |
+}
|
|
|
cb8e9e |
+
|
|
|
cb8e9e |
int
|
|
|
cb8e9e |
main (int argc, char **argv)
|
|
|
cb8e9e |
{
|
|
|
cb8e9e |
@@ -818,15 +833,14 @@ main (int argc, char **argv)
|
|
|
cb8e9e |
|
|
|
cb8e9e |
loc_wipe (&rootloc);
|
|
|
cb8e9e |
glfs_subvol_done (fs, top_subvol);
|
|
|
cb8e9e |
- glfs_fini (fs);
|
|
|
cb8e9e |
+ cleanup (fs);
|
|
|
cb8e9e |
|
|
|
cb8e9e |
return ret;
|
|
|
cb8e9e |
out:
|
|
|
cb8e9e |
if (fs && top_subvol)
|
|
|
cb8e9e |
glfs_subvol_done (fs, top_subvol);
|
|
|
cb8e9e |
loc_wipe (&rootloc);
|
|
|
cb8e9e |
- if (fs)
|
|
|
cb8e9e |
- glfs_fini (fs);
|
|
|
cb8e9e |
+ cleanup (fs);
|
|
|
cb8e9e |
|
|
|
cb8e9e |
return ret;
|
|
|
cb8e9e |
}
|
|
|
cb8e9e |
--
|
|
|
cb8e9e |
1.7.1
|
|
|
cb8e9e |
|