Bug 1233651
Summary: | pthread cond and mutex variables of fs struct has to be destroyed conditionally. | ||
---|---|---|---|
Product: | [Community] GlusterFS | Reporter: | Humble Chirammal <hchiramm> |
Component: | libgfapi | Assignee: | bugs <bugs> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Sudhir D <sdharane> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 3.7.1 | CC: | bugs, gluster-bugs, ndevos, sdharane |
Target Milestone: | --- | Keywords: | Triaged |
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | glusterfs-3.7.3 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | 1208482 | Environment: | |
Last Closed: | 2015-07-30 09:50:03 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: | 1208482 | ||
Bug Blocks: |
Description
Humble Chirammal
2015-06-19 11:15:00 UTC
COMMIT: http://review.gluster.org/10971 committed in release-3.7 by Niels de Vos (ndevos) ------ commit 5afaa6e64f46a32f2b86512236677066adc36510 Author: Humble Devassy Chirammal <hchiramm> Date: Mon May 18 17:37:14 2015 +0530 libgfapi: introduce bit flags for pthread mutex and cond variables At present stage, the initialization and destroy of conditional and mutex variables of glfs struct happen in different places and there is no uniform way of destroying these variables incase there is a failure when initializing these. The fs mutex and conditional variables are getting destroyed from glfs_free_from_ctx(). However this destroy is not done by a conditional check inside destroy function. By introducing bit flags in glfs object, we can make use of the same (if there is a failure in initialization) in glfs_fini() which is evolving as one and only function to free fs and ctx resources. This patch introduce the flags field and set the flags according to the initialization flow of the mutex and conditional variables of struct glfs members. Without this patch we are compelled to use the goto lables and other hacks in init functions to make sure the resources are freed if there is an error path. Change-Id: I86e2719fb7ce437419a05699b4f06c14b02d0e69 BUG: 1233651 Signed-off-by: Humble Devassy Chirammal <hchiramm> Signed-off-by: Poornima G <pgurusid> Reviewed-on: http://review.gluster.org/10120 Reviewed-by: Niels de Vos <ndevos> Tested-by: Gluster Build System <jenkins.com> Tested-by: NetBSD Build System Reviewed-by: Shyamsundar Ranganathan <srangana> (cherry picked from commit bc858473db1e1091b15d3f3d69ac6ba5d20b58e7) Reviewed-on: http://review.gluster.org/10971 Tested-by: NetBSD Build System <jenkins.org> Reviewed-by: Kaleb KEITHLEY <kkeithle> 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.7.3, please open a new bug report. glusterfs-3.7.3 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.devel/12078 [2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user |