summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/nsr-recon/src/recon_driver.h
diff options
context:
space:
mode:
authorRaghavan P <rpichai@redhat.com>2014-02-19 07:03:26 +0530
committerJeff Darcy <jdarcy@redhat.com>2014-03-03 19:41:32 +0000
commitc28972ea53cc7cdb91c7aac01754dd7f0b66e1a7 (patch)
treefc316e94c6494b282a1179bb97939909e5cbcba0 /xlators/cluster/nsr-recon/src/recon_driver.h
parent3bbfebc8dc21c469d47b576069ae137aec4567c9 (diff)
changes to NSR reconciliation code to add error handling.
Description of chnages added: 1) In recon driver, check for all glfs calls return values. 2) make the driver send back error values to other drivers or to main translator. 3) let the leader retry on errors Change-Id: I050003a819d2314c8fdfd111df465041c30ee6e3 Signed-off-by: Raghavan P <rpichai@redhat.com>
Diffstat (limited to 'xlators/cluster/nsr-recon/src/recon_driver.h')
-rw-r--r--xlators/cluster/nsr-recon/src/recon_driver.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/xlators/cluster/nsr-recon/src/recon_driver.h b/xlators/cluster/nsr-recon/src/recon_driver.h
index 4030c9d73..8d87e29af 100644
--- a/xlators/cluster/nsr-recon/src/recon_driver.h
+++ b/xlators/cluster/nsr-recon/src/recon_driver.h
@@ -181,7 +181,7 @@ typedef struct nsr_recon_record_details_s {
typedef struct _nsr_role_work_s {
nsr_recon_role_t role;
- uint32_t txn_id;
+ uint32_t term;
struct list_head list;
} nsr_role_work_t;
@@ -236,6 +236,8 @@ typedef struct _nsr_per_node_worker_s {
#if defined(NSR_DEBUG)
FILE *fp;
#endif
+ int32_t result; // result of latest work
+ int32_t op_errno; // errno
} nsr_per_node_worker_t;
typedef struct _nsr_replica_worker_s {
@@ -256,7 +258,7 @@ typedef struct _nsr_recon_driver_ctxt {
nsr_role_work_t role_head;
volatile int32_t outstanding;
uint32_t reconciliator_index;
- uint32_t txn_id;
+ uint32_t term;
uint32_t current_term;
jmp_buf *env;
nsr_mode_t mode; // default set to seq
@@ -269,7 +271,7 @@ void *
nsr_reconciliation_driver(void *);
gf_boolean_t
-nsr_recon_driver_set_role(nsr_recon_driver_ctx_t *ctx, nsr_recon_role_t *rr, uint32_t txn_id);
+nsr_recon_driver_set_role(nsr_recon_driver_ctx_t *ctx, nsr_recon_role_t *rr, uint32_t term);
#define atomic_inc(ptr) ((void) __sync_fetch_and_add(ptr, 1))
#define atomic_dec(ptr) ((void) __sync_fetch_and_add(ptr, -1))