summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-dir-read.c
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2016-05-27 15:47:07 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2016-05-30 21:27:35 -0700
commit3d75e32d6ada03c979077681ff414d948800f07e (patch)
tree18297f74761127aa7dc3ca65a3dffa5d61eb10ff /xlators/cluster/afr/src/afr-dir-read.c
parenta45bef14b370fe82d4f3af41a35d2802a359c287 (diff)
cluster/afr: Unwind xdata_rsp even in case of failures
DHT expects GF_PREOP_CHECK_FAILED to be present in xdata_rsp in case of mkdir failures because of stale layout. But AFR was unwinding null xdata_rsp in case of failures. This was leading to mkdir failures just after remove-brick. Unwind the xdata_rsp in case of failures to make sure the response from brick reaches dht. BUG: 1340623 Change-Id: Idd3f7b95730e8ea987b608e892011ff190e181d1 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/14553 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> Reviewed-by: Anuradha Talur <atalur@redhat.com> Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-dir-read.c')
-rw-r--r--xlators/cluster/afr/src/afr-dir-read.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/afr-dir-read.c b/xlators/cluster/afr/src/afr-dir-read.c
index 841c64361cf..2260e5dac26 100644
--- a/xlators/cluster/afr/src/afr-dir-read.c
+++ b/xlators/cluster/afr/src/afr-dir-read.c
@@ -153,7 +153,8 @@ afr_validate_read_subvol (inode_t *inode, xlator_t *this, int par_read_subvol)
* -1 above due to gen being 0, which is why it is OK to pass NULL for
* read_subvol_args here.
*/
- entry_read_subvol = afr_data_subvol_get (inode, this, 0, 0, NULL);
+ entry_read_subvol = afr_data_subvol_get (inode, this, NULL, NULL,
+ NULL, NULL);
if (entry_read_subvol != par_read_subvol)
return -1;