summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/ec/src/ec-common.h
diff options
context:
space:
mode:
authorXavier Hernandez <xhernandez@datalab.es>2014-07-14 17:34:04 +0200
committerVijay Bellur <vbellur@redhat.com>2014-09-15 23:12:16 -0700
commitd97863562bb0d2f685df3d2e3aa4bef1299c8307 (patch)
treeb8d9455cdface5425e2452e98751ac75dac358e4 /xlators/cluster/ec/src/ec-common.h
parent2be54585002cd1c9d02928b89a02047b58dd6aed (diff)
ec: Optimize read/write performance
This patch significantly improves performance of read/write operations on a dispersed volume by reusing previous inodelk/ entrylk operations on the same inode/entry. This reduces the latency of each individual operation considerably. Inode version and size are also updated when needed instead of on each request. This gives an additional boost. Change-Id: I4b98d5508c86b53032e16e295f72a3f83fd8fcac BUG: 1122586 Signed-off-by: Xavier Hernandez <xhernandez@datalab.es> Reviewed-on: http://review.gluster.org/8369 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com>
Diffstat (limited to 'xlators/cluster/ec/src/ec-common.h')
-rw-r--r--xlators/cluster/ec/src/ec-common.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/xlators/cluster/ec/src/ec-common.h b/xlators/cluster/ec/src/ec-common.h
index 83f3ba9637e..4fc89fdde33 100644
--- a/xlators/cluster/ec/src/ec-common.h
+++ b/xlators/cluster/ec/src/ec-common.h
@@ -47,10 +47,10 @@
#define EC_STATE_DISPATCH 4
#define EC_STATE_PREPARE_ANSWER 5
#define EC_STATE_REPORT 6
-#define EC_STATE_UPDATE_SIZE_AND_VERSION 7
+#define EC_STATE_LOCK_REUSE 7
#define EC_STATE_UNLOCK 8
-#define EC_STATE_WRITE_START 100
+#define EC_STATE_DELAYED_START 100
#define EC_STATE_HEAL_ENTRY_LOOKUP 200
#define EC_STATE_HEAL_ENTRY_PREPARE 201
@@ -81,14 +81,15 @@ void ec_update_bad(ec_fop_data_t * fop, uintptr_t good);
void ec_fop_set_error(ec_fop_data_t * fop, int32_t error);
-void ec_lock_inode(ec_fop_data_t * fop, loc_t * loc);
-void ec_lock_entry(ec_fop_data_t * fop, loc_t * loc);
-void ec_lock_fd(ec_fop_data_t * fop, fd_t * fd);
-
+void ec_lock_prepare_inode(ec_fop_data_t * fop, loc_t * loc);
+void ec_lock_prepare_entry(ec_fop_data_t * fop, loc_t * loc);
+void ec_lock_prepare_fd(ec_fop_data_t * fop, fd_t * fd);
+void ec_lock(ec_fop_data_t * fop);
+void ec_lock_reuse(ec_fop_data_t * fop, int32_t update);
void ec_unlock(ec_fop_data_t * fop);
void ec_get_size_version(ec_fop_data_t * fop);
-void ec_update_size_version(ec_fop_data_t * fop);
+void ec_flush_size_version(ec_fop_data_t * fop);
void ec_dispatch_all(ec_fop_data_t * fop);
void ec_dispatch_inc(ec_fop_data_t * fop);
@@ -97,8 +98,8 @@ void ec_dispatch_one(ec_fop_data_t * fop);
void ec_wait_winds(ec_fop_data_t * fop);
+void ec_resume(ec_fop_data_t * fop, int32_t error);
void ec_resume_parent(ec_fop_data_t * fop, int32_t error);
-void ec_report(ec_fop_data_t * fop, int32_t error);
void ec_manager(ec_fop_data_t * fop, int32_t error);