From d2ac835ba0d51ce1679dc71640472eecbfbaa704 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Sat, 14 Apr 2012 12:21:25 +0530 Subject: storage/posix: Move landfill inside .glusterfs Change-Id: Ia2944f891dd62e72f3c79678c3a1fed389854a90 BUG: 811970 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.com/3158 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- xlators/cluster/afr/src/afr-common.c | 5 ----- xlators/cluster/afr/src/afr-dir-read.c | 30 --------------------------- xlators/cluster/afr/src/afr-self-heal-entry.c | 8 ++----- 3 files changed, 2 insertions(+), 41 deletions(-) (limited to 'xlators/cluster') diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c index ed366ce43..300ab92ef 100644 --- a/xlators/cluster/afr/src/afr-common.c +++ b/xlators/cluster/afr/src/afr-common.c @@ -2121,11 +2121,6 @@ afr_lookup (call_frame_t *frame, xlator_t *this, goto out; } - if (!strcmp (local->loc.path, "/" GF_REPLICATE_TRASH_DIR)) { - op_errno = ENOENT; - goto out; - } - ret = inode_ctx_get (local->loc.inode, this, &ctx); if (ret == 0) { /* lookup is a revalidate */ diff --git a/xlators/cluster/afr/src/afr-dir-read.c b/xlators/cluster/afr/src/afr-dir-read.c index b661cfa9c..ce91ffba7 100644 --- a/xlators/cluster/afr/src/afr-dir-read.c +++ b/xlators/cluster/afr/src/afr-dir-read.c @@ -468,24 +468,6 @@ afr_readdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, gf_dirent_t *entries, dict_t *xdata) { - afr_local_t * local = NULL; - gf_dirent_t * entry = NULL; - gf_dirent_t * tmp = NULL; - - local = frame->local; - - if (op_ret == -1) - goto out; - - list_for_each_entry_safe (entry, tmp, &entries->list, list) { - if ((local->fd->inode == local->fd->inode->table->root) - && !strcmp (entry->d_name, GF_REPLICATE_TRASH_DIR)) { - list_del_init (&entry->list); - GF_FREE (entry); - } - } - -out: AFR_STACK_UNWIND (readdir, frame, op_ret, op_errno, entries, NULL); return 0; @@ -502,8 +484,6 @@ afr_readdirp_cbk (call_frame_t *frame, void *cookie, xlator_t *this, xlator_t ** children = NULL; int32_t next_call_child = -1; int ret = 0; - gf_dirent_t * entry = NULL; - gf_dirent_t * tmp = NULL; int32_t *last_index = NULL; int32_t read_child = -1; int32_t *fresh_children = NULL; @@ -567,16 +547,6 @@ afr_readdirp_cbk (call_frame_t *frame, void *cookie, xlator_t *this, } } - if (op_ret != -1) { - list_for_each_entry_safe (entry, tmp, &entries->list, list) { - if ((local->fd->inode == local->fd->inode->table->root) - && !strcmp (entry->d_name, GF_REPLICATE_TRASH_DIR)) { - list_del_init (&entry->list); - GF_FREE (entry); - } - } - } - if (priv->strict_readdir) { if (fd_ctx->failed_over) { if (list_empty (&entries->list)) { diff --git a/xlators/cluster/afr/src/afr-self-heal-entry.c b/xlators/cluster/afr/src/afr-self-heal-entry.c index d528f9842..b039124d2 100644 --- a/xlators/cluster/afr/src/afr-self-heal-entry.c +++ b/xlators/cluster/afr/src/afr-self-heal-entry.c @@ -694,9 +694,7 @@ afr_sh_entry_expunge_entry (call_frame_t *frame, xlator_t *this, name = entry->d_name; if ((strcmp (name, ".") == 0) - || (strcmp (name, "..") == 0) - || ((strcmp (local->loc.path, "/") == 0) - && (strcmp (name, GF_REPLICATE_TRASH_DIR) == 0))) { + || (strcmp (name, "..") == 0)) { gf_log (this->name, GF_LOG_TRACE, "skipping inspection of %s under %s", @@ -1941,9 +1939,7 @@ afr_sh_entry_impunge_entry (call_frame_t *frame, xlator_t *this, sh->impunge_done = afr_sh_entry_impunge_entry_done; if ((strcmp (entry->d_name, ".") == 0) - || (strcmp (entry->d_name, "..") == 0) - || ((strcmp (local->loc.path, "/") == 0) - && (strcmp (entry->d_name, GF_REPLICATE_TRASH_DIR) == 0))) { + || (strcmp (entry->d_name, "..") == 0)) { gf_log (this->name, GF_LOG_TRACE, "skipping inspection of %s under %s", -- cgit