summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/ec/src/ec-common.h
diff options
context:
space:
mode:
authorXavier Hernandez <xhernandez@datalab.es>2015-08-05 23:42:41 +0200
committerPranith Kumar Karampuri <pkarampu@redhat.com>2015-08-14 02:02:21 -0700
commitcfac0a9c78ead389ec261010a1c094bc60ca2810 (patch)
tree5cb67d5cabd387afc8e937b8be6df9ea7efd9322 /xlators/cluster/ec/src/ec-common.h
parentae37a97252e33e1c5cb636b679e2458a489d2550 (diff)
cluster/ec: Fix tracking of good bricks
The bitmask of good and bad bricks was kept in the context of the corresponding inode or fd. This was problematic when an external process (another client or the self-heal process) did heal the bricks but no one changed the bitmaks of other clients. This patch removes the bitmask stored in the context and calculates which bricks are healthy after locking them and doing the initial xattrop. After that, it's updated using the result of each fop. > Change-Id: I225e31cd219a12af4ca58871d8a4bb6f742b223c > BUG: 1236065 > Signed-off-by: Xavier Hernandez <xhernandez@datalab.es> > Reviewed-on: http://review.gluster.org/11844 > Tested-by: NetBSD Build System <jenkins@build.gluster.org> > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Change-Id: Idbe68b28b865c4b28366703ad1e96ae16ba44b66 BUG: 1235964 Signed-off-by: Xavier Hernandez <xhernandez@datalab.es> Reviewed-on: http://review.gluster.org/11867 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Diffstat (limited to 'xlators/cluster/ec/src/ec-common.h')
-rw-r--r--xlators/cluster/ec/src/ec-common.h11
1 files changed, 3 insertions, 8 deletions
diff --git a/xlators/cluster/ec/src/ec-common.h b/xlators/cluster/ec/src/ec-common.h
index 39787126700..036da091f43 100644
--- a/xlators/cluster/ec/src/ec-common.h
+++ b/xlators/cluster/ec/src/ec-common.h
@@ -27,11 +27,6 @@ typedef enum {
#define EC_CONFIG_ALGORITHM 0
-#define EC_FLAG_UPDATE_LOC_PARENT 0x0001
-#define EC_FLAG_UPDATE_LOC_INODE 0x0002
-#define EC_FLAG_UPDATE_FD 0x0004
-#define EC_FLAG_UPDATE_FD_INODE 0x0008
-
#define EC_SELFHEAL_BIT 62
#define EC_MINIMUM_ONE -1
@@ -78,11 +73,11 @@ typedef enum {
gf_boolean_t ec_dispatch_one_retry (ec_fop_data_t *fop, ec_cbk_data_t **cbk);
int32_t ec_dispatch_next(ec_fop_data_t * fop, int32_t idx);
-void ec_complete(ec_fop_data_t * fop);
+void ec_complete(ec_fop_data_t *fop);
-void ec_update_bad(ec_fop_data_t * fop, uintptr_t good);
+void ec_update_good(ec_fop_data_t *fop, uintptr_t good);
-void ec_fop_set_error(ec_fop_data_t * fop, int32_t error);
+void ec_fop_set_error(ec_fop_data_t *fop, int32_t error);
ec_cbk_data_t *
ec_fop_prepare_answer(ec_fop_data_t *fop, gf_boolean_t ro);