summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-self-heal-algorithm.h
diff options
context:
space:
mode:
authorVikas Gorur <vikas@gluster.com>2009-09-17 05:56:31 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-09-22 06:13:34 -0700
commitd2b7e65ec0c35c4ee16f28f449553d90fb88fa6a (patch)
treed215e4680f9872a9da25d145699f32616076f911 /xlators/cluster/afr/src/afr-self-heal-algorithm.h
parent8c224de82b9b3e75f2dd9c264d5d3726dd1ef379 (diff)
cluster/afr: Add the "diff" self-heal algorithm.
The "diff" self-heal algorithm works as follows: For each block: Compute MD5 checksum on source and all sinks If checksum on a sink differs from source: Read block from source and write to sinks Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-self-heal-algorithm.h')
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-algorithm.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-algorithm.h b/xlators/cluster/afr/src/afr-self-heal-algorithm.h
index 646fd2ee7c1..8998ce8883d 100644
--- a/xlators/cluster/afr/src/afr-self-heal-algorithm.h
+++ b/xlators/cluster/afr/src/afr-self-heal-algorithm.h
@@ -29,6 +29,14 @@ struct afr_sh_algorithm {
afr_sh_algo_fn fn;
};
-struct afr_sh_algorithm afr_self_heal_algorithms[1];
+struct afr_sh_algorithm afr_self_heal_algorithms[2];
+
+typedef struct {
+ uint8_t *checksum; /* array of MD5 checksums for each child
+ Each checksum is MD5_DIGEST_LEN bytes long */
+
+ unsigned char *write_needed;
+ size_t block_size;
+} afr_sh_algo_diff_private_t;
#endif /* __AFR_SELF_HEAL_ALGORITHM_H__ */