From a12cf2dedb98b115812163361846b02f8adc8353 Mon Sep 17 00:00:00 2001 From: Raghavendra G Date: Wed, 27 Aug 2014 10:47:24 +0530 Subject: cluster/dht: remove specifying cached-subvol as part of name in unlink. commit 667b2496c3f29e24ed359a05b0f44df0d1894969 introduced a functionality where we can specify the subvol where file is stored. As part of same commit, dht_unlink was also changed to accept cached-subvol as part of name. While it makes sense to specify subvol while creating file, there is no necessity for specifying the subvol during unlink, since the default unlink logic works fine with this functionality too. Also, this code in unlink doesn't work well when files get migrated by rebalance process. Hence removing it. Change-Id: Ic3fc32ad657e2dcd677a4c80b04a618029eddd89 BUG: 1130888 Signed-off-by: Raghavendra G Reviewed-on: http://review.gluster.org/8548 Tested-by: Gluster Build System Reviewed-by: Shyamsundar Ranganathan Reviewed-by: Jeff Darcy Reviewed-by: Vijay Bellur --- xlators/cluster/dht/src/dht-common.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'xlators/cluster') diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index f4cbf8d0744..aa7628fd9eb 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -4287,17 +4287,6 @@ dht_unlink (call_frame_t *frame, xlator_t *this, loc_t *loc, int xflag, VALIDATE_OR_GOTO (this, err); VALIDATE_OR_GOTO (loc, err); - if (dht_filter_loc_subvol_key (this, loc, &local->loc, - &cached_subvol)) { - gf_log (this->name, GF_LOG_INFO, - "unlinking %s on %s (given path %s)", - local->loc.path, cached_subvol->name, loc->path); - STACK_WIND (frame, dht_unlink_cbk, - cached_subvol, cached_subvol->fops->unlink, - &local->loc, xflag, xdata); - goto done; - } - local = dht_local_init (frame, loc, NULL, GF_FOP_UNLINK); if (!local) { op_errno = ENOMEM; @@ -4332,7 +4321,7 @@ dht_unlink (call_frame_t *frame, xlator_t *this, loc_t *loc, int xflag, cached_subvol, cached_subvol->fops->unlink, loc, xflag, xdata); } -done: + return 0; err: op_errno = (op_errno == -1) ? errno : op_errno; -- cgit