diff options
author | Vikas Gorur <vikas@gluster.com> | 2009-10-23 10:11:47 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2009-10-26 07:09:05 -0700 |
commit | 4163a3f8fbcc5e0d84d955258161f3a6f7a86de8 (patch) | |
tree | 50b6ee8ae655f1b8b822e50d3cc290729c17b1a5 /xlators/cluster/afr/src/afr-self-heal-entry.c | |
parent | 6490122f107c992f2600fc7d3214a43c3f50df70 (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-self-heal-entry.c')
-rw-r--r-- | xlators/cluster/afr/src/afr-self-heal-entry.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-entry.c b/xlators/cluster/afr/src/afr-self-heal-entry.c index cf7bf9a9c0d..1e36dee69c0 100644 --- a/xlators/cluster/afr/src/afr-self-heal-entry.c +++ b/xlators/cluster/afr/src/afr-self-heal-entry.c @@ -1977,6 +1977,10 @@ afr_sh_entry_fix (call_frame_t *frame, xlator_t *this) source = afr_sh_select_source (sh->sources, priv->child_count); sh->source = source; + if (sh->background) { + sh->unwind (frame, this); + } + afr_sh_entry_sync_prepare (frame, this); return 0; |