diff options
| author | Pranith Kumar K <pkarampu@redhat.com> | 2014-09-23 12:43:02 +0530 |
|---|---|---|
| committer | Vijay Bellur <vbellur@redhat.com> | 2014-09-23 09:49:10 -0700 |
| commit | 1b27b8231e2d69c3bfd4710ab3f631cd3604e362 (patch) | |
| tree | 4fe5d5e5a43d5ae38c2401b4bff13586fc52db2c /xlators/cluster/afr/src/afr-self-heal.h | |
| parent | e582cc6577913760d6b8636cef3d7267890ac1f1 (diff) | |
cluster/afr: Don't start heal when lookup succeeds on < 2 children
Backport of http://review.gluster.org/8698
Problem:
When self-heal code doesn't see at least 2 successes on looking up children,
then self-heal can't be done. What is happening now is if all the lookups fail
then the pending changelog is all zeros in xattrs so all the children are
becoming sources and leading to crashes when the code paths further assume that
some data structures are populated properly
Fix:
Don't proceed with self-heals when < 2 children succeed lookups.
BUG: 1145726
Change-Id: I65465843f0e554c8ccdd8fa930ab42ac123ec023
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/8824
Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-self-heal.h')
| -rw-r--r-- | xlators/cluster/afr/src/afr-self-heal.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal.h b/xlators/cluster/afr/src/afr-self-heal.h index 31f12a4e74a..7936659e5e4 100644 --- a/xlators/cluster/afr/src/afr-self-heal.h +++ b/xlators/cluster/afr/src/afr-self-heal.h @@ -12,6 +12,7 @@ #ifndef _AFR_SELFHEAL_H #define _AFR_SELFHEAL_H +#define AFR_SH_MIN_PARTICIPANTS 2 /* Perform fop on all UP subvolumes and wait for all callbacks to return */ @@ -181,4 +182,7 @@ afr_selfheal_newentry_mark (call_frame_t *frame, xlator_t *this, inode_t *inode, inode_t* afr_inode_link (inode_t *inode, struct iatt *iatt); + +unsigned int +afr_success_count (struct afr_reply *replies, unsigned int count); #endif /* !_AFR_SELFHEAL_H */ |
