summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht
diff options
context:
space:
mode:
authorN Balachandran <nbalacha@redhat.com>2016-12-16 18:55:28 +0530
committerKaleb KEITHLEY <kkeithle@redhat.com>2017-05-12 12:04:15 +0000
commit3fc67c062b379562b8b121d5eed042a58cbb0b26 (patch)
tree47e46138fe4005eeb6d7c93a29262426c7f1ff92 /xlators/cluster/dht
parent71cb7f3eb4fb706aab7f83906592942a2ff2e924 (diff)
cluster/tier: Don't update cached subvol
tier_readdirp_cbk updates the cached subvol to the hot tier if it finds a linkto file. However, if no lookup has been sent to the hot tier, lower layers will not have updated the inode-ctx causing later fops to fail. Change-Id: Ib8a5e58a6e7fd7750cf6a0ea85da611aa24c7512 BUG: 1402406 Signed-off-by: N Balachandran <nbalacha@redhat.com> Reviewed-on: https://review.gluster.org/16163 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Dan Lambright <dlambrig@gmail.com> Tested-by: Dan Lambright <dlambrig@gmail.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Diffstat (limited to 'xlators/cluster/dht')
-rw-r--r--xlators/cluster/dht/src/tier-common.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/xlators/cluster/dht/src/tier-common.c b/xlators/cluster/dht/src/tier-common.c
index 1cb7afdd9f9..b2abda73265 100644
--- a/xlators/cluster/dht/src/tier-common.c
+++ b/xlators/cluster/dht/src/tier-common.c
@@ -885,21 +885,7 @@ tier_readdirp_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int op_ret
if (check_is_linkfile (NULL, (&orig_entry->d_stat),
orig_entry->dict,
conf->link_xattr_name)) {
- inode = inode_find (itable,
- orig_entry->d_stat.ia_gfid);
- if (inode) {
- ret = dht_layout_preset
- (this, TIER_UNHASHED_SUBVOL,
- inode);
- if (ret)
- gf_msg (this->name,
- GF_LOG_WARNING, 0,
- DHT_MSG_LAYOUT_SET_FAILED,
- "failed to link the layout"
- " in inode");
- inode_unref (inode);
- inode = NULL;
- }
+ goto entries;
} else if (IA_ISDIR(entry->d_stat.ia_type)) {
if (orig_entry->inode) {
@@ -944,6 +930,8 @@ tier_readdirp_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int op_ret
}
}
}
+
+entries:
list_add_tail (&entry->list, &entries.list);
count++;
}