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 --- xlators/cluster/afr/src/afr-common.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'xlators/cluster/afr/src/afr-common.c') diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c index 48b4c1a422d..d2b3e46e53f 100644 --- a/xlators/cluster/afr/src/afr-common.c +++ b/xlators/cluster/afr/src/afr-common.c @@ -2351,6 +2351,13 @@ afr_lookup (call_frame_t *frame, xlator_t *this, goto out; } + if (local->loc.path && + (strcmp (local->loc.path, "/" GF_REPLICATE_TRASH_DIR) == 0)) { + op_errno = EPERM; + ret = -1; + goto out; + } + ret = inode_ctx_get (local->loc.inode, this, &ctx); if (ret == 0) { /* lookup is a revalidate */ -- cgit