diff options
author | Ravishankar N <ravishankar@redhat.com> | 2017-01-13 09:55:49 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2017-01-13 19:59:55 -0800 |
commit | ef341819eaedb703bc2f7bc1cd2e5ac855fed42b (patch) | |
tree | e6cc852758627cc068ffa5372f98da42fa2f79d1 /xlators/cluster/afr/src/afr.h | |
parent | b2ead317933a48ce00f3ee1460080cf4ad16ec9b (diff) |
afr: Avoid resetting event_gen when brick is always down
Backport of http://review.gluster.org/#/c/16309/
Problem:
__afr_set_in_flight_sb_status(), which resets event_gen to zero, is
called if failed_subvols[i] is non-zero for any brick. But failed_subvols[i]
is true even if the brick was down *before* the transaction started.
Hence say if 1 brick is down in a replica-3, every writev that comes
will trigger an inode refresh because of this resetting, as seen from
the no. of FSTATs in the profile info in the BZ.
Fix:
Reset event gen only if the brick was previously a valid read child and
the FOP failed on it the first time.
Also `s/afr_inode_read_subvol_reset/afr_inode_event_gen_reset` because
the function only resets event gen and not the data/metadata readable.
Change-Id: I7840f7123d3b3e0404743988088ec349391ca980
BUG: 1412890
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-on: http://review.gluster.org/16387
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators/cluster/afr/src/afr.h')
-rw-r--r-- | xlators/cluster/afr/src/afr.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/xlators/cluster/afr/src/afr.h b/xlators/cluster/afr/src/afr.h index daf193c72c3..17ccfb20545 100644 --- a/xlators/cluster/afr/src/afr.h +++ b/xlators/cluster/afr/src/afr.h @@ -831,7 +831,7 @@ afr_inode_read_subvol_set (inode_t *inode, xlator_t *this, int event_generation); int -afr_inode_read_subvol_reset (inode_t *inode, xlator_t *this); +afr_inode_event_gen_reset (inode_t *inode, xlator_t *this); int afr_read_subvol_select_by_policy (inode_t *inode, xlator_t *this, @@ -855,10 +855,6 @@ afr_read_subvol_get (inode_t *inode, xlator_t *this, int *subvol_p, afr_read_subvol_get(i, t, s, NULL, e, AFR_METADATA_TRANSACTION, a) int -afr_inode_ctx_reset_unreadable_subvol (inode_t *inode, xlator_t *this, - int subvol_idx, int txn_type); - -int afr_inode_refresh (call_frame_t *frame, xlator_t *this, inode_t *inode, uuid_t gfid, afr_inode_refresh_cbk_t cbk); |