Bug 1350787 - gfapi: in case of handle based APIs, close glfd after successful create
Summary: gfapi: in case of handle based APIs, close glfd after successful create
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: libgfapi
Version: 3.8.0
Hardware: All
OS: All
unspecified
medium
Target Milestone: ---
Assignee: Jiffin
QA Contact: Sudhir D
URL:
Whiteboard:
Depends On: 1339553
Blocks: 1334907
TreeView+ depends on / blocked
 
Reported: 2016-06-28 12:00 UTC by Jiffin
Modified: 2016-07-08 14:42 UTC (History)
3 users (show)

Fixed In Version: glusterfs-3.8.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1339553
Environment:
Last Closed: 2016-07-08 14:42:55 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Jiffin 2016-06-28 12:00:05 UTC
+++ This bug was initially created as a clone of Bug #1339553 +++

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:

--- Additional comment from Vijay Bellur on 2016-05-25 06:02:23 EDT ---

REVIEW: http://review.gluster.org/14532 (gfapi/handleops: Close glfd after create) posted (#1) for review on master by soumya k (skoduri)

--- Additional comment from Vijay Bellur on 2016-06-02 03:24:31 EDT ---

REVIEW: http://review.gluster.org/14532 (gfapi/handleops: Close glfd after create) posted (#2) for review on master by jiffin tony Thottan (jthottan)

--- Additional comment from Vijay Bellur on 2016-06-09 03:21:06 EDT ---

REVIEW: http://review.gluster.org/14532 (gfapi/handleops: Close glfd after create) posted (#3) for review on master by jiffin tony Thottan (jthottan)

--- Additional comment from Vijay Bellur on 2016-06-27 06:12:54 EDT ---

REVIEW: http://review.gluster.org/14532 (gfapi/handleops: Close glfd after create) posted (#4) for review on master by soumya k (skoduri)

--- Additional comment from Vijay Bellur on 2016-06-27 07:36:10 EDT ---

REVIEW: http://review.gluster.org/14532 (gfapi/handleops: Avoid using glfd during create) posted (#5) for review on master by soumya k (skoduri)

--- Additional comment from Vijay Bellur on 2016-06-28 07:22:15 EDT ---

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 1 Vijay Bellur 2016-06-28 12:02:18 UTC
REVIEW: http://review.gluster.org/14820 (gfapi/handleops: Avoid using glfd during create) posted (#1) for review on release-3.8 by jiffin tony Thottan (jthottan)

Comment 2 Vijay Bellur 2016-07-01 09:36:49 UTC
COMMIT: http://review.gluster.org/14820 committed in release-3.8 by Niels de Vos (ndevos) 
------
commit 01d1bee0321e1a0bf83f34130404440dc17a73d0
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.
    
    Upstream refernce :
    >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>
    >(cherry picked from commit 763ed1017b0011934ad2414d7396c46e528ea5b3)
    
    Change-Id: I119874ffb63fb4aa18f846ba1fdbe77874b66a54
    BUG: 1350787
    Signed-off-by: Soumya Koduri <skoduri>
    Signed-off-by: Jiffin Tony Thottan <jthottan>
    Reviewed-on: http://review.gluster.org/14820
    Smoke: Gluster Build System <jenkins.org>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.org>
    Reviewed-by: Kaleb KEITHLEY <kkeithle>
    Reviewed-by: Niels de Vos <ndevos>

Comment 3 Niels de Vos 2016-07-08 14:42:55 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.8.1, please open a new bug report.

glusterfs-3.8.1 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://thread.gmane.org/gmane.comp.file-systems.gluster.packaging/156
[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.