Bug 1339553

Summary: gfapi: in case of handle based APIs, close glfd after successful create
Product: [Community] GlusterFS Reporter: Soumya Koduri <skoduri>
Component: libgfapiAssignee: Soumya Koduri <skoduri>
Status: CLOSED CURRENTRELEASE QA Contact: Sudhir D <sdharane>
Severity: medium Docs Contact:
Priority: unspecified    
Version: mainlineCC: bugs
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: glusterfs-3.9.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1350787 1351877 (view as bug list) Environment:
Last Closed: 2017-03-27 18:15:34 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:
Bug Depends On:    
Bug Blocks: 1334907, 1338068, 1350787, 1351877    

Description Soumya Koduri 2016-05-25 10:01:26 UTC
Description of problem:

In gfapi, we create and associate a (gl)fd during creation of any file. But in case of handleops, since application is interested in handle (glfs_object), this
(gl)fd is not passed to application resulting in a leak. The fix is to close it after successful create.

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Vijay Bellur 2016-05-25 10:02:23 UTC
REVIEW: http://review.gluster.org/14532 (gfapi/handleops: Close glfd after create) posted (#1) for review on master by soumya k (skoduri)

Comment 2 Vijay Bellur 2016-06-02 07:24:31 UTC
REVIEW: http://review.gluster.org/14532 (gfapi/handleops: Close glfd after create) posted (#2) for review on master by jiffin tony Thottan (jthottan)

Comment 3 Vijay Bellur 2016-06-09 07:21:06 UTC
REVIEW: http://review.gluster.org/14532 (gfapi/handleops: Close glfd after create) posted (#3) for review on master by jiffin tony Thottan (jthottan)

Comment 4 Vijay Bellur 2016-06-27 10:12:54 UTC
REVIEW: http://review.gluster.org/14532 (gfapi/handleops: Close glfd after create) posted (#4) for review on master by soumya k (skoduri)

Comment 5 Vijay Bellur 2016-06-27 11:36:10 UTC
REVIEW: http://review.gluster.org/14532 (gfapi/handleops: Avoid using glfd during create) posted (#5) for review on master by soumya k (skoduri)

Comment 6 Vijay Bellur 2016-06-28 11:22:15 UTC
COMMIT: http://review.gluster.org/14532 committed in master by Kaleb KEITHLEY (kkeithle) 
------
commit 763ed1017b0011934ad2414d7396c46e528ea5b3
Author: Soumya Koduri <skoduri>
Date:   Wed May 25 14:38:31 2016 +0530

    gfapi/handleops: Avoid using glfd during create
    
    To avoid leaking glfd while creating a file using handleops and
    since application shall not be interested in it, use the 'fd'
    object directly which can be un'refed post create.
    
    Change-Id: I119874ffb63fb4aa18f846ba1fdbe77874b66a54
    BUG: 1339553
    Signed-off-by: Soumya Koduri <skoduri>
    Signed-off-by: Jiffin Tony Thottan <jthottan>
    Reviewed-on: http://review.gluster.org/14532
    NetBSD-regression: NetBSD Build System <jenkins.org>
    Reviewed-by: Niels de Vos <ndevos>
    CentOS-regression: Gluster Build System <jenkins.org>
    Tested-by: Gluster Build System <jenkins.org>
    Smoke: Gluster Build System <jenkins.org>

Comment 7 Shyamsundar 2017-03-27 18:15:34 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.9.0, please open a new bug report.

glusterfs-3.9.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/gluster-users/2016-November/029281.html
[2] https://www.gluster.org/pipermail/gluster-users/