summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-read-txn.c
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2016-05-16 15:05:36 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2016-05-29 04:13:38 -0700
commit1d28634b9aab65b08c1c2e9a6f48619c9fa494dc (patch)
tree7f413ab069f6a1cf576aad271a5a6875ebb2a57e /xlators/cluster/afr/src/afr-read-txn.c
parent1b44116337b9ef59c2286b88e0b90d596caab270 (diff)
cluster/afr: Refresh inode for inode-write fops in need
Problem: If a named fresh-lookup is done on an loc and the fop fails on one of the bricks or not sent on one of the bricks, but by the time response comes to afr, if the brick is up, 'can_interpret' will be set to false in afr_lookup_done(), this will lead to inode-ctx for that inode to be not set, this can lead to EIO in case of a transaction as it depends on 'readable' array to be available by that point. Fix: Refresh inode for inode-write fops for the ctx to be set if it is not already done at the time of named fresh-lookup or if the file is in split-brain where we need to perform one more refresh before failing the fop to check if the file is still in split-brain or not. >BUG: 1336612 >Change-Id: I5c50b62c8de06129b8516039f7c252e5008c47a5 >Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> >Reviewed-on: http://review.gluster.org/14368 >Smoke: Gluster Build System <jenkins@build.gluster.com> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >Reviewed-by: Ravishankar N <ravishankar@redhat.com> >CentOS-regression: Gluster Build System <jenkins@build.gluster.com> >Backport of http://review.gluster.org/14545 BUG: 1337831 Change-Id: If4465ab8fc506e1f905b623b82a53bdab8f5cffd Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/14453 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Ravishankar N <ravishankar@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-read-txn.c')
-rw-r--r--xlators/cluster/afr/src/afr-read-txn.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/cluster/afr/src/afr-read-txn.c b/xlators/cluster/afr/src/afr-read-txn.c
index a70565c37a1..32ad6a46d17 100644
--- a/xlators/cluster/afr/src/afr-read-txn.c
+++ b/xlators/cluster/afr/src/afr-read-txn.c
@@ -121,7 +121,7 @@ afr_read_txn_continue (call_frame_t *frame, xlator_t *this, int subvol)
if (!local->refreshed) {
local->refreshed = _gf_true;
- afr_inode_refresh (frame, this, local->inode,
+ afr_inode_refresh (frame, this, local->inode, NULL,
afr_read_txn_refresh_done);
} else {
afr_read_txn_next_subvol (frame, this);
@@ -268,7 +268,7 @@ read:
return 0;
refresh:
- afr_inode_refresh (frame, this, inode, afr_read_txn_refresh_done);
+ afr_inode_refresh (frame, this, inode, NULL, afr_read_txn_refresh_done);
return 0;
}