diff options
| author | Mohammed Rafi KC <rkavunga@redhat.com> | 2019-06-04 11:13:50 +0530 | 
|---|---|---|
| committer | Amar Tumballi <amarts@redhat.com> | 2019-06-08 05:46:31 +0000 | 
| commit | 9e0de2b634b888dd069e908b7745197d20fe7036 (patch) | |
| tree | 39c2f8268c7228769e90f06047b904064904e1b3 /libglusterfs/src | |
| parent | 2eaf8e846afd71c30f2a6ff6f863a39b1145b8b6 (diff) | |
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 <rkavunga@redhat.com>
Diffstat (limited to 'libglusterfs/src')
| -rw-r--r-- | libglusterfs/src/xlator.c | 12 | 
1 files changed, 9 insertions, 3 deletions
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)  | 
