From 3fc67c062b379562b8b121d5eed042a58cbb0b26 Mon Sep 17 00:00:00 2001 From: N Balachandran Date: Fri, 16 Dec 2016 18:55:28 +0530 Subject: 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 Reviewed-on: https://review.gluster.org/16163 Smoke: Gluster Build System Reviewed-by: Dan Lambright Tested-by: Dan Lambright NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Kaleb KEITHLEY --- xlators/cluster/dht/src/tier-common.c | 18 +++--------------- 1 file 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++; } -- cgit