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