summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-common.h
diff options
context:
space:
mode:
authorN Balachandran <nbalacha@redhat.com>2017-08-04 14:46:38 +0530
committerRaghavendra G <rgowdapp@redhat.com>2017-08-08 10:21:18 +0000
commitcdca1cb26a0aba390c6d8485c0d6d95e22ffc8bd (patch)
tree19d1a53ebb72fe29cacf7137f9fb68f238e84ffc /xlators/cluster/dht/src/dht-common.h
parent111d6bda9259126b0429113c9b8ba479958a4398 (diff)
cluster/dht: Check for open fd only on EBADF
DHT fd based fops used to check if the fd was open on the cached subvol before winding the call. However, this introduced a performance regression of about 30% for reads. This check was introduced to handle cases where files were migrated while IOs were happening. As this is not the common case, dht will now check if the fd is open on the cached subvol only if the call fails with EBADF. This will prevent a performance hit where a rebalance is not running. Change-Id: I2035a858d63c3fcd22bb634055bbb0ad01686808 BUG: 1476665 Signed-off-by: N Balachandran <nbalacha@redhat.com> Reviewed-on: https://review.gluster.org/17976 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Susant Palai <spalai@redhat.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'xlators/cluster/dht/src/dht-common.h')
-rw-r--r--xlators/cluster/dht/src/dht-common.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h
index 60b0909a1e1..ae93d9a03ab 100644
--- a/xlators/cluster/dht/src/dht-common.h
+++ b/xlators/cluster/dht/src/dht-common.h
@@ -352,6 +352,9 @@ struct dht_local {
/* rename rollback */
int *ret_cache ;
+
+ /* fd open check */
+ gf_boolean_t fd_checked;
};
typedef struct dht_local dht_local_t;