diff options
author | Mohammed Rafi KC <rafi.kavungal@iternity.com> | 2020-07-29 13:42:53 +0530 |
---|---|---|
committer | Ravishankar N <ravishankar@redhat.com> | 2020-08-13 04:20:36 +0000 |
commit | 320bf93d36a1c20d661cb11968825fc055fcc168 (patch) | |
tree | 9d7c7f938fbd64dbd27070c6cfe4d695c7001404 /xlators/cluster/afr/src/afr.h | |
parent | b759709f947da57e00b44262fa3fa72a53557ca2 (diff) |
afr/split-brain: fix client side split-brain resolution when quorum is enabled
Problem:
If we set favourite child policy, then automatic split-brain resolution
should work in all cases. This was failing when quorum count was set to
a non-zero value. The initial lookup before the read txn was failing
with ENOTCONN. Since we don't have a readable subvol, we were failing it.
We were only looking to the split brain resolution choice set through the
cli command.
Fix:
We will now consider the favourite child policy if split-brain choice
has not been set via cli command.
Change-Id: Id2016c3a90d0763ac6f1a0131571053f595576f0
Fixes: #1404
Signed-off-by: Mohammed Rafi KC <rafi.kavungal@iternity.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr.h')
-rw-r--r-- | xlators/cluster/afr/src/afr.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/cluster/afr/src/afr.h b/xlators/cluster/afr/src/afr.h index 1fff5640940..667b5636d52 100644 --- a/xlators/cluster/afr/src/afr.h +++ b/xlators/cluster/afr/src/afr.h @@ -1271,8 +1271,8 @@ int afr_inode_split_brain_choice_set(inode_t *inode, xlator_t *this, int spb_choice); int -afr_inode_split_brain_choice_get(inode_t *inode, xlator_t *this, - int *spb_choice); +afr_split_brain_read_subvol_get(inode_t *inode, xlator_t *this, + call_frame_t *frame, int *spb_subvol); int afr_get_child_index_from_name(xlator_t *this, char *name); |