summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/xlator.c
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2013-02-26 16:12:11 +0530
committerVijay Bellur <vbellur@redhat.com>2013-07-26 01:13:58 -0700
commit4944fc943efc41df1841e4e559180171f6541112 (patch)
treec8669fac313887dbfdcb6840d9c41f4bf377adbd /libglusterfs/src/xlator.c
parent115f6a679ba0117a5757fe69f8f326d633c38fbf (diff)
cluster/afr: Handle REPLICATE_TRASH_DIR from old bricks
Change-Id: Ib99f79d3fa607c818dbc62006516480f598d8add BUG: 886998 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/4640 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'libglusterfs/src/xlator.c')
-rw-r--r--libglusterfs/src/xlator.c11
1 files changed, 11 insertions, 0 deletions
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)
{