diff options
author | Raghavendra G <rgowdapp@redhat.com> | 2014-08-27 10:47:24 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2014-09-02 11:49:53 -0700 |
commit | a12cf2dedb98b115812163361846b02f8adc8353 (patch) | |
tree | faba5f16d603ea339d74e6a393ecba49fe691187 | |
parent | 4adfb6fb7c371c6bc03acdaf61f1cca496388356 (diff) |
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 <rgowdapp@redhat.com>
Reviewed-on: http://review.gluster.org/8548
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
-rw-r--r-- | xlators/cluster/dht/src/dht-common.c | 13 |
1 files changed, 1 insertions, 12 deletions
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; |