diff options
| author | Barak Sason Rofman <bsasonro@redhat.com> | 2020-09-16 13:22:57 +0300 |
|---|---|---|
| committer | Barak Sason Rofman <bsasonro@redhat.com> | 2020-10-01 17:50:15 +0300 |
| commit | d63b97c93a1d7d123f55e3652389af289ddd3096 (patch) | |
| tree | 44bad42b412c9a3d606f2026260ae68f89d178a2 /xlators/cluster/dht/src/dht-inode-write.c | |
| parent | 268faabed00995537394c04ac168c018167fbe27 (diff) | |
dht - Remove "tier" code (part 2)
Part 1 of this patch https://review.gluster.org/#/c/glusterfs/+/24328/
Following part 1, this patch complety removes all traces of
"tier" feature in dht.
This is based in the work done in
https://review.gluster.org/#/c/glusterfs/+/23935/
Change-Id: I7fba1ab7249719301ca578b4a6f4acac748da145
updates: #1097
Signed-off-by: Barak Sason Rofman <bsasonro@redhat.com>
Diffstat (limited to 'xlators/cluster/dht/src/dht-inode-write.c')
| -rw-r--r-- | xlators/cluster/dht/src/dht-inode-write.c | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/xlators/cluster/dht/src/dht-inode-write.c b/xlators/cluster/dht/src/dht-inode-write.c index eda2491e0ff..2f23ce90fbd 100644 --- a/xlators/cluster/dht/src/dht-inode-write.c +++ b/xlators/cluster/dht/src/dht-inode-write.c @@ -93,30 +93,28 @@ dht_writev_cbk(call_frame_t *frame, void *cookie, xlator_t *this, int op_ret, /* Check if the rebalance phase1 is true */ if (IS_DHT_MIGRATION_PHASE1(postbuf)) { - if (!dht_is_tier_xlator(this)) { + if (!local->xattr_req) { + local->xattr_req = dict_new(); if (!local->xattr_req) { - local->xattr_req = dict_new(); - if (!local->xattr_req) { - gf_msg(this->name, GF_LOG_ERROR, DHT_MSG_NO_MEMORY, ENOMEM, - "insufficient memory"); - local->op_errno = ENOMEM; - local->op_ret = -1; - goto out; - } - } - - ret = dict_set_uint32(local->xattr_req, - GF_PROTECT_FROM_EXTERNAL_WRITES, 1); - if (ret) { - gf_msg(this->name, GF_LOG_ERROR, DHT_MSG_DICT_SET_FAILED, 0, - "Failed to set key %s in dictionary", - GF_PROTECT_FROM_EXTERNAL_WRITES); + gf_msg(this->name, GF_LOG_ERROR, DHT_MSG_NO_MEMORY, ENOMEM, + "insufficient memory"); local->op_errno = ENOMEM; local->op_ret = -1; goto out; } } + ret = dict_set_uint32(local->xattr_req, GF_PROTECT_FROM_EXTERNAL_WRITES, + 1); + if (ret) { + gf_msg(this->name, GF_LOG_ERROR, DHT_MSG_DICT_SET_FAILED, 0, + "Failed to set key %s in dictionary", + GF_PROTECT_FROM_EXTERNAL_WRITES); + local->op_errno = ENOMEM; + local->op_ret = -1; + goto out; + } + dht_iatt_merge(this, &local->stbuf, postbuf); dht_iatt_merge(this, &local->prebuf, prebuf); |
