summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr.h
diff options
context:
space:
mode:
authorVikas Gorur <vikas@gluster.com>2009-09-17 05:56:30 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-09-22 06:13:34 -0700
commit8c224de82b9b3e75f2dd9c264d5d3726dd1ef379 (patch)
tree7a0edbc676b601cc08802dd4680ef816f4fe628c /xlators/cluster/afr/src/afr.h
parent356449c0b39d600a16b195df30d0fc37693575f8 (diff)
cluster/afr: Make the self-heal algorithm pluggable.
Abstract the read/write loop part of data self-heal. This patch has support for the "full" (i.e., read and write entire file) algorithm. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr.h')
-rw-r--r--xlators/cluster/afr/src/afr.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr.h b/xlators/cluster/afr/src/afr.h
index d9a3435c3f4..a7f980475f6 100644
--- a/xlators/cluster/afr/src/afr.h
+++ b/xlators/cluster/afr/src/afr.h
@@ -92,7 +92,13 @@ typedef struct {
off_t offset;
loc_t parent_loc;
+
+ /* private data for the particular self-heal algorithm */
+ void *private;
+
int (*completion_cbk) (call_frame_t *frame, xlator_t *this);
+ int (*algo_completion_cbk) (call_frame_t *frame, xlator_t *this);
+ int (*algo_abort_cbk) (call_frame_t *frame, xlator_t *this);
call_frame_t *sh_frame;
} afr_self_heal_t;