path: root/xlators/cluster/ec/src/ec-types.h
diff options
authorPranith Kumar K <>2017-06-25 16:34:01 +0530
committerPranith Kumar Karampuri <>2017-10-24 09:30:25 +0000
commita8e16c81e3d14b577ac738574e19a16543df419e (patch)
tree963abf9f48d65fc469564d9f558aa6fe60bfe296 /xlators/cluster/ec/src/ec-types.h
parent1260ee53b1674234e6f083563bdcd258e46a6faa (diff)
cluster/ec: Allow parallel writes in EC if possible
Problem: Ec at the moment sends one modification fop after another, so if some of the disks become slow, for a while then the wait time for the writes that are waiting in the queue becomes really bad. Fix: Allow parallel writes when possible. For this we need to make 3 changes. 1) Each fop now has range parameters they will be updating. 2) Xattrop is changed to handle parallel xattrop requests where some would be modifying just dirty xattr. 3) Fops that refer to size now take locks and update the locks. Fixes #251 Change-Id: Ibc3c15372f91bbd6fb617f0d99399b3149fa64b2 Signed-off-by: Pranith Kumar K <>
Diffstat (limited to 'xlators/cluster/ec/src/ec-types.h')
1 files changed, 5 insertions, 3 deletions
diff --git a/xlators/cluster/ec/src/ec-types.h b/xlators/cluster/ec/src/ec-types.h
index 94ac911238e..9aed7dc1d27 100644
--- a/xlators/cluster/ec/src/ec-types.h
+++ b/xlators/cluster/ec/src/ec-types.h
@@ -220,8 +220,8 @@ struct _ec_lock {
struct list_head owners;
/* List of fops waiting to be an owner of the lock. Fops are added to this
- * list when the current owner has an incompatible access (shared vs
- * exclusive) or the lock is not acquired yet. */
+ * list when the current owner has an incompatible access (conflicting lock)
+ * or the lock is not acquired yet. */
struct list_head waiting;
/* List of fops that will wait until the next unlock/lock cycle. This
@@ -230,7 +230,6 @@ struct _ec_lock {
* after the lock is reacquired. */
struct list_head frozen;
- int32_t exclusive;
uintptr_t mask;
uintptr_t good_mask;
uintptr_t healing;
@@ -260,6 +259,8 @@ struct _ec_lock_link {
loc_t *base;
uint64_t size;
uint32_t waiting_flags;
+ off_t fl_start;
+ off_t fl_end;
struct _ec_fop_data {
@@ -573,6 +574,7 @@ struct _ec {
gf_boolean_t shutdown;
gf_boolean_t eager_lock;
gf_boolean_t optimistic_changelog;
+ gf_boolean_t parallel_writes;
uint32_t background_heals;
uint32_t heal_wait_qlen;
uint32_t self_heal_window_size; /* max size of read/writes */