diff options
Diffstat (limited to 'libglusterfs/src')
| -rw-r--r-- | libglusterfs/src/xlator.c | 13 | ||||
| -rw-r--r-- | libglusterfs/src/xlator.h | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c index 0d09b3fbc82..16da028dc09 100644 --- a/libglusterfs/src/xlator.c +++ b/libglusterfs/src/xlator.c @@ -1025,6 +1025,19 @@ out: return ret; } +gf_boolean_t +loc_is_nameless (loc_t *loc) +{ + gf_boolean_t ret = _gf_false; + + GF_VALIDATE_OR_GOTO ("xlator", loc, out); + + if ((!loc->parent && gf_uuid_is_null (loc->pargfid)) || !loc->name) + ret = _gf_true; +out: + return ret; +} + int xlator_destroy (xlator_t *xl) { diff --git a/libglusterfs/src/xlator.h b/libglusterfs/src/xlator.h index c2959efbd95..5fb26547d56 100644 --- a/libglusterfs/src/xlator.h +++ b/libglusterfs/src/xlator.h @@ -1029,6 +1029,7 @@ void loc_pargfid (loc_t *loc, uuid_t pargfid); char* loc_gfid_utoa (loc_t *loc); gf_boolean_t loc_is_root (loc_t *loc); int32_t loc_build_child (loc_t *child, loc_t *parent, char *name); +gf_boolean_t loc_is_nameless (loc_t *loc); int xlator_mem_acct_init (xlator_t *xl, int num_types); int is_gf_log_command (xlator_t *trans, const char *name, char *value); int glusterd_check_log_level (const char *value); |
