From 9e0de2b634b888dd069e908b7745197d20fe7036 Mon Sep 17 00:00:00 2001 From: Mohammed Rafi KC Date: Tue, 4 Jun 2019 11:13:50 +0530 Subject: xlator/log: Add more logging in xlator_is_cleanup_starting This patch will add two extra logs for invalid argument Change-Id: I3950b4f4b9d88b1f1e788ef93d8f09d4bd8d4d8b updates: bz#1703948 Signed-off-by: Mohammed Rafi KC --- libglusterfs/src/xlator.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'libglusterfs/src/xlator.c') diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c index 526cd2e2e4d..8df45beb9a3 100644 --- a/libglusterfs/src/xlator.c +++ b/libglusterfs/src/xlator.c @@ -1516,12 +1516,18 @@ xlator_is_cleanup_starting(xlator_t *this) glusterfs_graph_t *graph = NULL; xlator_t *xl = NULL; - if (!this) + if (!this) { + gf_msg("xlator", GF_LOG_WARNING, EINVAL, LG_MSG_INVALID_ARG, + "xlator object is null, returning false"); goto out; - graph = this->graph; + } - if (!graph) + graph = this->graph; + if (!graph) { + gf_msg("xlator", GF_LOG_WARNING, EINVAL, LG_MSG_INVALID_ARG, + "Graph is not set for xlator %s", this->name); goto out; + } xl = graph->first; if (xl && xl->cleanup_starting) -- cgit