Bug 924490 - Use a proper method table for init/fini
Summary: Use a proper method table for init/fini
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: core
Version: 3.4.0-beta
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jeff Darcy
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 924488
TreeView+ depends on / blocked
 
Reported: 2013-03-21 21:24 UTC by Jeff Darcy
Modified: 2015-05-17 21:46 UTC (History)
2 users (show)

Fixed In Version: glusterfs-3.5.0qa1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-05-17 21:46:54 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Jeff Darcy 2013-03-21 21:24:44 UTC
Besides general aesthetic/maintainability goodness, looking up these functions via a dispatch table instead of directly has two very concrete benefits.

(1) It enables derivative translators such as NUFA and switch to call their parent's init to ensure proper initialization (see bug924488).

(2) It makes it possible to set breakpoints on init functions by name instead of having to look up the file name and line number because "init" and "fini" are ambiguous.

Note that using wrapper functions (e.g. dht.c:init calls dht_init which is also callable from nufa.c:init) would also work, but clutters up the code more.

Comment 1 Jeff Darcy 2013-03-21 23:32:11 UTC
http://review.gluster.org/4709

This also includes dispatch-table entries for reconfigure and notify.

Comment 2 Niels de Vos 2014-09-22 12:31:34 UTC
A beta release for GlusterFS 3.6.0 has been released. Please verify if the release solves this bug report for you. In case the glusterfs-3.6.0beta1 release does not have a resolution for this issue, leave a comment in this bug and move the status to ASSIGNED. If this release fixes the problem for you, leave a note and change the status to VERIFIED.

Packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update (possibly an "updates-testing" repository) infrastructure for your distribution.

[1] http://supercolony.gluster.org/pipermail/gluster-users/2014-September/018836.html
[2] http://supercolony.gluster.org/pipermail/gluster-users/


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