summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/ec/src/ec.h
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2015-09-08 16:23:36 +0530
committerXavier Hernandez <xhernandez@datalab.es>2015-10-09 05:26:05 -0700
commitfe3c6f0fa2bf8590f4c540fd9561aeeec1243361 (patch)
tree03955fdaac90d3254b5c833094839aa44af5fe34 /xlators/cluster/ec/src/ec.h
parent47d8d2fc9c88c95dfcae2c5c06e6eb3b1ce03a92 (diff)
cluster/ec: Implement gfid-hash read-policy
Add a policy in ec to performs reads from same bricks as long as they are good. Based on the gfid of the file/directory it determines the bricks to be considered for reading. Change-Id: Ic97b5c54c086a28b5e07a330a4fd448551b49376 BUG: 1261260 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/12133 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Xavier Hernandez <xhernandez@datalab.es>
Diffstat (limited to 'xlators/cluster/ec/src/ec.h')
-rw-r--r--xlators/cluster/ec/src/ec.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/xlators/cluster/ec/src/ec.h b/xlators/cluster/ec/src/ec.h
index f335fd52afc..4ee7983b289 100644
--- a/xlators/cluster/ec/src/ec.h
+++ b/xlators/cluster/ec/src/ec.h
@@ -25,6 +25,12 @@
#define EC_VERSION_SIZE 2
+typedef enum {
+ EC_ROUND_ROBIN,
+ EC_GFID_HASH,
+ EC_READ_POLICY_MAX
+} ec_read_policy_t;
+
struct _ec
{
xlator_t * xl;
@@ -58,6 +64,7 @@ struct _ec
ec_self_heald_t shd;
char vol_uuid[UUID_SIZE + 1];
dict_t *leaf_to_subvolid;
+ ec_read_policy_t read_policy;
};
void ec_pending_fops_completed(ec_t *ec);