summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr.h
diff options
context:
space:
mode:
authorVikas Gorur <vikas@gluster.com>2009-10-23 10:11:47 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-10-26 07:09:05 -0700
commit4163a3f8fbcc5e0d84d955258161f3a6f7a86de8 (patch)
tree50b6ee8ae655f1b8b822e50d3cc290729c17b1a5 /xlators/cluster/afr/src/afr.h
parent6490122f107c992f2600fc7d3214a43c3f50df70 (diff)
cluster/afr: Do self-heal in the background.
This patch introduces a new option "background-self-heal-count", with a default value of 16. This means that upto {background-self-heal-count} number of files/directories will be healed in the background at any given time. If such number of self-heals are already in progress, further self-heals take place in the foreground. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 320 (Improve self-heal performance) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=320
Diffstat (limited to 'xlators/cluster/afr/src/afr.h')
-rw-r--r--xlators/cluster/afr/src/afr.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr.h b/xlators/cluster/afr/src/afr.h
index e3ab4ebe4..98584af76 100644
--- a/xlators/cluster/afr/src/afr.h
+++ b/xlators/cluster/afr/src/afr.h
@@ -50,6 +50,8 @@ typedef struct _afr_private {
unsigned int data_self_heal_window_size; /* max number of pipelined
read/writes */
+ unsigned int background_self_heal_count;
+ unsigned int background_self_heals_started;
gf_boolean_t metadata_self_heal; /* on/off */
gf_boolean_t entry_self_heal; /* on/off */
@@ -99,6 +101,11 @@ typedef struct {
loc_t parent_loc;
+ call_frame_t *orig_frame;
+ gf_boolean_t unwound;
+ gf_boolean_t background; /* is this self-heal in the background? */
+ int (*unwind) (call_frame_t *frame, xlator_t *this);
+
/* private data for the particular self-heal algorithm */
void *private;
@@ -530,6 +537,11 @@ afr_local_cleanup (afr_local_t *local, xlator_t *this);
int
afr_frame_return (call_frame_t *frame);
+void
+afr_set_split_brain (xlator_t *this, inode_t *inode, int32_t split_brain);
+
+
+
#define AFR_STACK_UNWIND(fop, frame, params ...) \
do { \
afr_local_t *__local = NULL; \