diff options
Diffstat (limited to 'libglusterfs')
-rw-r--r-- | libglusterfs/src/glusterfs/xlator.h | 3 | ||||
-rw-r--r-- | libglusterfs/src/libglusterfs.sym | 1 | ||||
-rw-r--r-- | libglusterfs/src/xlator.c | 21 |
3 files changed, 25 insertions, 0 deletions
diff --git a/libglusterfs/src/glusterfs/xlator.h b/libglusterfs/src/glusterfs/xlator.h index b7d0249c9c8..1a0ed99774b 100644 --- a/libglusterfs/src/glusterfs/xlator.h +++ b/libglusterfs/src/glusterfs/xlator.h @@ -1092,4 +1092,7 @@ gluster_graph_take_reference(xlator_t *tree); gf_boolean_t mgmt_is_multiplexed_daemon(char *name); + +gf_boolean_t +xlator_is_cleanup_starting(xlator_t *this); #endif /* _XLATOR_H */ diff --git a/libglusterfs/src/libglusterfs.sym b/libglusterfs/src/libglusterfs.sym index 1955005a88f..93ab05f166a 100644 --- a/libglusterfs/src/libglusterfs.sym +++ b/libglusterfs/src/libglusterfs.sym @@ -1164,3 +1164,4 @@ glusterfs_process_svc_attach_volfp glusterfs_mux_volfile_reconfigure glusterfs_process_svc_detach mgmt_is_multiplexed_daemon +xlator_is_cleanup_starting diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c index 292416ae449..526cd2e2e4d 100644 --- a/libglusterfs/src/xlator.c +++ b/libglusterfs/src/xlator.c @@ -1508,3 +1508,24 @@ mgmt_is_multiplexed_daemon(char *name) } return _gf_false; } + +gf_boolean_t +xlator_is_cleanup_starting(xlator_t *this) +{ + gf_boolean_t cleanup = _gf_false; + glusterfs_graph_t *graph = NULL; + xlator_t *xl = NULL; + + if (!this) + goto out; + graph = this->graph; + + if (!graph) + goto out; + + xl = graph->first; + if (xl && xl->cleanup_starting) + cleanup = _gf_true; +out: + return cleanup; +} |