17b94a
From 9b94397a5a735910fab2a29670146a1feb6d890e Mon Sep 17 00:00:00 2001
17b94a
From: Mohammed Rafi KC <rkavunga@redhat.com>
17b94a
Date: Tue, 4 Jun 2019 11:13:50 +0530
17b94a
Subject: [PATCH 174/178] xlator/log: Add more logging in
17b94a
 xlator_is_cleanup_starting
17b94a
17b94a
This patch will add two extra logs for invalid argument
17b94a
17b94a
> upstream patch : https://review.gluster.org/#/c/glusterfs/+/22810/
17b94a
17b94a
>Change-Id: I3950b4f4b9d88b1f1e788ef93d8f09d4bd8d4d8b
17b94a
>updates: bz#1703948
17b94a
>Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
17b94a
17b94a
Change-Id: I3950b4f4b9d88b1f1e788ef93d8f09d4bd8d4d8b
17b94a
BUG: 1703434
17b94a
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
17b94a
Reviewed-on: https://code.engineering.redhat.com/gerrit/172800
17b94a
Tested-by: RHGS Build Bot <nigelb@redhat.com>
17b94a
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
17b94a
---
17b94a
 libglusterfs/src/xlator.c | 12 +++++++++---
17b94a
 1 file changed, 9 insertions(+), 3 deletions(-)
17b94a
17b94a
diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c
17b94a
index fbfbbe2..71e1ed4 100644
17b94a
--- a/libglusterfs/src/xlator.c
17b94a
+++ b/libglusterfs/src/xlator.c
17b94a
@@ -1494,12 +1494,18 @@ xlator_is_cleanup_starting(xlator_t *this)
17b94a
     glusterfs_graph_t *graph = NULL;
17b94a
     xlator_t *xl = NULL;
17b94a
 
17b94a
-    if (!this)
17b94a
+    if (!this) {
17b94a
+        gf_msg("xlator", GF_LOG_WARNING, EINVAL, LG_MSG_INVALID_ARG,
17b94a
+               "xlator object is null, returning false");
17b94a
         goto out;
17b94a
-    graph = this->graph;
17b94a
+    }
17b94a
 
17b94a
-    if (!graph)
17b94a
+    graph = this->graph;
17b94a
+    if (!graph) {
17b94a
+        gf_msg("xlator", GF_LOG_WARNING, EINVAL, LG_MSG_INVALID_ARG,
17b94a
+               "Graph is not set for xlator %s", this->name);
17b94a
         goto out;
17b94a
+    }
17b94a
 
17b94a
     xl = graph->first;
17b94a
     if (xl && xl->cleanup_starting)
17b94a
-- 
17b94a
1.8.3.1
17b94a