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