Bug 1416889

Summary: Simplify refcount API for free'ing function
Product: [Community] GlusterFS Reporter: Niels de Vos <ndevos>
Component: coreAssignee: Niels de Vos <ndevos>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: mainlineCC: bugs
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.11.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-05-30 18:39:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Niels de Vos 2017-01-26 17:18:20 UTC
Description of problem:
All of the functions called to free the refcounted structure are doing a
typecast from (void*) to their own type taht is being free'd. This
really is not needed and the refcount interface is made a little simpler
without the requirement of typecasting.


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

How reproducible:
Pass a destructor in GF_REF_INIT() with a non (void*) parameter.

Comment 1 Worker Ant 2017-01-26 17:30:29 UTC
REVIEW: https://review.gluster.org/16471 (refcount: typecast function for calling on free) posted (#1) for review on master by Niels de Vos (ndevos)

Comment 2 Worker Ant 2017-01-27 10:13:02 UTC
REVIEW: https://review.gluster.org/16471 (refcount: typecast function for calling on free) posted (#2) for review on master by Niels de Vos (ndevos)

Comment 3 Worker Ant 2017-01-31 05:04:48 UTC
COMMIT: https://review.gluster.org/16471 committed in master by Raghavendra G (rgowdapp) 
------
commit f2ca301bd741e3e3f076cd3f72fcd377bcef2a1a
Author: Niels de Vos <ndevos>
Date:   Thu Jan 26 16:45:51 2017 +0100

    refcount: typecast function for calling on free
    
    All of the functions called to free the refcounted structure are doing a
    typecast from (void*) to their own type taht is being free'd. This
    really is not needed and the refcount interface is made a little simpler
    without the requirement of typecasting.
    
    With this small improvement in the API, all callers are updated too.
    
    Change-Id: I32473b6d1799f62861d4b2d78ea30c09e6c80ab1
    BUG: 1416889
    Signed-off-by: Niels de Vos <ndevos>
    Reviewed-on: https://review.gluster.org/16471
    Smoke: Gluster Build System <jenkins.org>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    Reviewed-by: Xavier Hernandez <xhernandez>
    CentOS-regression: Gluster Build System <jenkins.org>
    Reviewed-by: Kaleb KEITHLEY <kkeithle>

Comment 4 Shyamsundar 2017-05-30 18:39:31 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.11.0, please open a new bug report.

glusterfs-3.11.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-May/000073.html
[2] https://www.gluster.org/pipermail/gluster-users/