Bug 1424817 - Fix wrong operators, found by coverty
Summary: Fix wrong operators, found by coverty
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: core
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: M. Scherer
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-19 16:22 UTC by Michael S.
Modified: 2017-09-05 17:25 UTC (History)
1 user (show)

Fixed In Version: glusterfs-3.12.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-09-05 17:25:47 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Michael S. 2017-02-19 16:22:56 UTC
Description of problem:

    Fix wrong operators
    
    Coverty rightfully note that if we verify that
    A =! C or A != B, it will always be true.
    
    In one case, that prevent healing from continuing. In the other,
    that trigger useless logs.


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

How reproducible:
each time

Steps to Reproduce:
1. read https://download.gluster.org/pub/gluster/glusterfs/static-analysis/master/glusterfs-coverity/2017-02-17-8e7a8ea8/html/1/97stripe.c.html#error
2. read also https://download.gluster.org/pub/gluster/glusterfs/static-analysis/master/glusterfs-coverity/2017-02-17-8e7a8ea8/html/1/93dht-rebalance.c.html#error
3.

Actual results:
there is errornous code

Expected results:
no erronous code

Additional info:

Comment 1 Worker Ant 2017-02-19 16:23:24 UTC
REVIEW: https://review.gluster.org/16676 (Fix wrong operators) posted (#1) for review on master by Michael Scherer (misc)

Comment 2 Worker Ant 2017-05-03 14:31:26 UTC
REVIEW: https://review.gluster.org/16676 (Fix wrong operators) posted (#2) for review on master by Michael Scherer (misc)

Comment 3 Worker Ant 2017-05-04 14:58:20 UTC
COMMIT: https://review.gluster.org/16676 committed in master by Jeff Darcy (jeff.us) 
------
commit 5c68937ef943a5ed8179cb19fef833f2be790588
Author: Michael Scherer <misc>
Date:   Sun Feb 19 17:19:33 2017 +0100

    Fix wrong operators
    
    Coverty rightfully note that if we verify that
    A =! C or A != B, it will always be true.
    
    In one case, that prevent healing from continuing. In the other,
    that trigger useless logs. Fixing this bug also show that
    ENOSPC shouldn't abort the rebalance operation, as seen during
    the review of the first patch on
    https://review.gluster.org/#/c/16676/1/xlators/cluster/dht/src/dht-rebalance.c
    
    Change-Id: I93c4df43b880b211da202a7e49cef6b1ce7ab68f
    BUG: 1424817
    Signed-off-by: Michael Scherer <misc>
    Reviewed-on: https://review.gluster.org/16676
    Smoke: Gluster Build System <jenkins.org>
    Reviewed-by: Jeff Darcy <jeff.us>
    Tested-by: Jeff Darcy <jeff.us>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.org>
    Reviewed-by: Amar Tumballi <amarts>

Comment 4 Shyamsundar 2017-09-05 17:25:47 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-3.12.0, please open a new bug report.

glusterfs-3.12.0 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] http://lists.gluster.org/pipermail/announce/2017-September/000082.html
[2] https://www.gluster.org/pipermail/gluster-users/


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