summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-self-heal.h
diff options
context:
space:
mode:
authorVikas Gorur <vikas@gluster.com>2009-04-09 03:54:51 -0700
committerAnand V. Avati <avati@amp.gluster.com>2009-04-09 18:57:08 +0530
commitfb034ba3036fadc7cf35edc5cae7481149a67ca0 (patch)
tree65b4266718238dd11275e477a384c9b3b87b9ef9 /xlators/cluster/afr/src/afr-self-heal.h
parentbfbcde78924fc5847b31ae56fe8d14ea52b60dfd (diff)
Compulsorily do self heal if file sizes differ.
If file sizes differ, then compulsorily do self-heal. If no 'wise' sources are found, then pick a 'fool' with the biggest file size. If even 'fools' aren't found, pick the 'innocent' source with the biggest file size. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-self-heal.h')
-rw-r--r--xlators/cluster/afr/src/afr-self-heal.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal.h b/xlators/cluster/afr/src/afr-self-heal.h
index c98831b8b..73abd8fb9 100644
--- a/xlators/cluster/afr/src/afr-self-heal.h
+++ b/xlators/cluster/afr/src/afr-self-heal.h
@@ -27,7 +27,7 @@
#define OWNERSHIP_DIFFERS(buf1,buf2) ((((struct stat *)buf1)->st_uid) != (((struct stat *)buf2)->st_uid) || (((struct stat *)buf1)->st_gid != (((struct stat *)buf2)->st_gid)))
#define SIZE_DIFFERS(buf1,buf2) ((((struct stat *)buf1)->st_size) != (((struct stat *)buf2)->st_size))
-
+#define SIZE_GREATER(buf1,buf2) ((((struct stat *)buf1)->st_size > (((struct stat *)buf2)->st_size)))
int
afr_sh_has_metadata_pending (dict_t *xattr, int child_count, xlator_t *this);