From 4944fc943efc41df1841e4e559180171f6541112 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Tue, 26 Feb 2013 16:12:11 +0530 Subject: cluster/afr: Handle REPLICATE_TRASH_DIR from old bricks Change-Id: Ib99f79d3fa607c818dbc62006516480f598d8add BUG: 886998 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.org/4640 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- libglusterfs/src/xlator.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'libglusterfs/src/xlator.c') diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c index b1c090c1e64..a7caedf02e7 100644 --- a/libglusterfs/src/xlator.c +++ b/libglusterfs/src/xlator.c @@ -684,6 +684,17 @@ err: return ret; } +gf_boolean_t +loc_is_root (loc_t *loc) +{ + if (loc && __is_root_gfid (loc->gfid)) { + return _gf_true; + } else if (loc && loc->inode && __is_root_gfid (loc->inode->gfid)) { + return _gf_true; + } + return _gf_false; +} + int xlator_list_destroy (xlator_list_t *list) { -- cgit