summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkarthik-us <ksubrahm@redhat.com>2017-10-25 12:42:23 +0530
committerkarthik-us <ksubrahm@redhat.com>2017-11-17 17:00:39 +0530
commit0c59a33f13dac76e439f9b6f540974de2d0481df (patch)
tree8aef27496f3434d011d782b1a02e74157bc493a6
parent58189890dd810d8fae5953ca84948227a073e172 (diff)
cluster/afr: Print heal info split-brain output in stream fashion
Problem: When we trigger the heal info split-brain command the o/p is not streamed as it is received, but dumped at the end for all the bricks together. This gives a perception that the command is hung. Fix: When we get a split brain entry while crawling throught the pending heal entries, flush that immediately so that it prints the output in a stream fashion and doesn't look like the cli is hung. Change-Id: I7547e86b83202d66616749b8b31d4d0dff0abf07 BUG: 1514424 Signed-off-by: karthik-us <ksubrahm@redhat.com> (cherry picked from commit 05f9c13f4d69e4113f5a851f4097ef35ba3f33b2)
-rw-r--r--heal/src/glfs-heal.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/heal/src/glfs-heal.c b/heal/src/glfs-heal.c
index fb997948f57..3da88233ba4 100644
--- a/heal/src/glfs-heal.c
+++ b/heal/src/glfs-heal.c
@@ -112,6 +112,7 @@ void
glfsh_print_hr_spb_status (char *path, uuid_t gfid, char *status)
{
printf ("%s\n", path);
+ fflush (stdout);
return;
}
@@ -125,6 +126,7 @@ void
glfsh_print_hr_heal_status (char *path, uuid_t gfid, char *status)
{
printf ("%s%s\n", path, status);
+ fflush (stdout);
}
#if (HAVE_LIB_XML)