Bug 1225745 - [AFR-V2] - afr_final_errno() should treat op_ret > 0 also as success
Summary: [AFR-V2] - afr_final_errno() should treat op_ret > 0 also as success
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: replicate
Version: 3.6.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: bugs@gluster.org
QA Contact:
URL:
Whiteboard:
Depends On: 1225491
Blocks: glusterfs-3.6.4 1225743 1226163
TreeView+ depends on / blocked
 
Reported: 2015-05-28 07:37 UTC by Krutika Dhananjay
Modified: 2016-02-04 15:27 UTC (History)
2 users (show)

Fixed In Version: glusterfs-v3.6.4
Doc Type: Bug Fix
Doc Text:
Clone Of: 1225491
Environment:
Last Closed: 2016-02-04 15:27:21 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)

Description Krutika Dhananjay 2015-05-28 07:37:09 UTC
+++ This bug was initially created as a clone of Bug #1225491 +++

Description of problem:

Figured while reading code that the function afr_final_errno() does not treat op_ret > 0 as success.

What that means is that in inode write fops (where this function gets called by __afr_inode_write_finalize()), op_ret could be > 0 on success. And if the inode write fop failed on one or more subvols, there is a remote possibility that AFR, instead of choosing the most severe errno from the set of errnos returned by the subvolumes that saw a failure, winds up picking junk errno from the subvol where the fop actually succeeded. 

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

--- Additional comment from Anand Avati on 2015-05-27 09:35:46 EDT ---

REVIEW: http://review.gluster.org/10946 (cluster/afr: Treat op_ret >= 0 as success in afr_final_errno()) posted (#1) for review on master by Krutika Dhananjay (kdhananj@redhat.com)

--- Additional comment from Anand Avati on 2015-05-28 01:36:28 EDT ---

COMMIT: http://review.gluster.org/10946 committed in master by Pranith Kumar Karampuri (pkarampu@redhat.com) 
------
commit 9e1bb640983f72858aeabd793bbb7fc8b5c71b09
Author: Krutika Dhananjay <kdhananj@redhat.com>
Date:   Wed May 27 19:03:12 2015 +0530

    cluster/afr: Treat op_ret >= 0 as success in afr_final_errno()
    
    Change-Id: I7ec29428b7f7ef249014f948a5d616bfb8aaf80d
    BUG: 1225491
    Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
    Reviewed-on: http://review.gluster.org/10946
    Tested-by: NetBSD Build System
    Reviewed-by: Ravishankar N <ravishankar@redhat.com>
    Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>

Comment 1 Anand Avati 2015-06-03 05:23:30 UTC
REVIEW: http://review.gluster.org/10961 (cluster/afr: Treat op_ret >= 0 as success in afr_final_errno()) posted (#2) for review on release-3.6 by Krutika Dhananjay (kdhananj@redhat.com)

Comment 2 Anand Avati 2015-06-03 12:50:39 UTC
COMMIT: http://review.gluster.org/10961 committed in release-3.6 by Raghavendra Bhat (raghavendra@redhat.com) 
------
commit bc37696f76ee7575ab7321e3ee1ebaaefe759caa
Author: Krutika Dhananjay <kdhananj@redhat.com>
Date:   Wed May 27 19:03:12 2015 +0530

    cluster/afr: Treat op_ret >= 0 as success in afr_final_errno()
    
            Backport of: http://review.gluster.org/10946
    
    Change-Id: I6ca36fee5dc46f2a2afe04f3359c4102f45c3ae0
    BUG: 1225745
    Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
    Reviewed-on: http://review.gluster.org/10961
    Tested-by: Gluster Build System <jenkins@build.gluster.com>
    Reviewed-by: Ravishankar N <ravishankar@redhat.com>
    Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>

Comment 3 Kaushal 2016-02-04 15:27:21 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-v3.6.4, please open a new bug report.

glusterfs-v3.6.4 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] https://www.gluster.org/pipermail/gluster-users/2015-July/022826.html
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user


Note You need to log in before you can comment on or make changes to this bug.