[PATCH] Use talloc in source3 loadparm, make more handlers common

Andreas Schneider asn at samba.org
Tue Mar 11 03:58:24 MDT 2014


On Tuesday 11 March 2014 22:45:56 Andrew Bartlett wrote:
> On Tue, 2014-03-11 at 09:42 +0100, Andreas Schneider wrote:
> > On Tuesday 11 March 2014 09:20:01 Andrew Bartlett wrote:
> > > On Mon, 2014-03-10 at 16:46 +0100, Andreas Schneider wrote:
> > > > On Monday 10 March 2014 14:36:23 Andrew Bartlett wrote:
> > > > > On Wed, 2014-02-26 at 14:14 +0100, Andreas Schneider wrote:
> > > > > > On Monday 24 February 2014 17:46:52 you wrote:
> > > > > > > Now that much of loadparm is generated and made regular,
> > > > > > > Garming's
> > > > > > > attention has turned to the requested task of merging common
> > > > > > > code.
> > > > > > > In
> > > > > > > particular, there is a strong desire to undo the #include of
> > > > > > > param_table.c, and these steps are all critical to that goal.
> > > > > > > 
> > > > > > > The patch series starts with a simple talloc -> malloc
> > > > > > > conversion,
> > > > > > > and
> > > > > > > later patches construct an appropriate talloc tree.  Many other
> > > > > > > small
> > > > > > > changes are needed or desired along the way.
> > > > > > > 
> > > > > > > The general approach is to use the s3_fns hook to handle the
> > > > > > > special
> > > > > > > cases where the source3 code does something different, and to
> > > > > > > then
> > > > > > > slowly eliminate these hooks as even more code becomes common.
> > > > > > > 
> > > > > > > The patch series starts here:
> > > > > > > 
> > > > > > > https://gerrit.sernet.de/97
> > > > > > > 
> > > > > > > https://gerrit.sernet.de/#/q/status:open+project:samba+branch:ma
> > > > > > > ster
> > > > > > > +top
> > > > > > > ic:l oadparm-talloc-polish,n,z
> > > > > > 
> > > > > > I've reviewed them in Gerrit. There are function were I think we
> > > > > > should
> > > > > > remove them completely and use talloc and talloc pools.
> > > > > 
> > > > > Updated patches are in gerrit.
> > > > > 
> > > > > As far as I can see, the concerns raised in your earlier review on
> > > > > this
> > > > > code in gerrit have been addressed, and we now have patch extending
> > > > > the
> > > > > successful docs.py testsuite to confirm values can be correctly set.
> > > > 
> > > > What about the idea to use a talloc_pool() for Globals.ctx for all
> > > > allocations? So we could get rid of string_init() and string_free().
> > > 
> > > A talloc_pool() is used for Globals.ctx.  What isn't done is use of the
> > > talloc hierarchy to free memory, yet:  with a few exceptions, it is
> > > still treated like malloc, to avoid changing too many semantics at
> > > once.
> > > 
> > > This is all one-step-at-a-time stuff, which is why it is a little
> > > tedious.
> > 
> > There is only one patch where I would like to have a small change. After
> > that feel free to push with my RB.
> 
> Can you point me at the details for this?  Frustratingly I can't see
> that easily in the web interface or the review mails.

The one with a -1. Why doesn't the webinterface show it?

-- 
Andreas Schneider                   GPG-ID: CC014E3D
Samba Team                             asn at samba.org
www.samba.org



More information about the samba-technical mailing list