My plans and direction for a merged loadparm
Andrew Bartlett
abartlet at samba.org
Wed Jun 29 15:50:32 MDT 2011
On Tue, 2011-06-28 at 22:22 +1000, Andrew Bartlett wrote:
> On Tue, 2011-06-28 at 07:53 -0400, simo wrote:
> > On Tue, 2011-06-28 at 19:30 +1000, Andrew Bartlett wrote:
> > > I'm continuing to work on a merged loadparm. My hope is to have a
> > > common set of parameters that we load, common values for those
> > > parameters and hopefully a single loadparm implementation.
> > >
> > > So the list isn't blind-sided by my changes, I figured it might be worth
> > > pointing out the rough course I'm trying to plot:
> > >
> > > My next step is to change the source3 loadparm code to use offset (ie,
> > > offsetof() integers for global and local variables. Local (per-share)
> > > variables already use offsets, but do so implicitly via PTR_DIFF calls
> > > at runtime. If we use them globally, we can share the struct
> > > param_struct between the two implementations, which in turn makes it
> > > easier to complete the loadparm_s3_ctx() code.
> > >
> > > My not-yet-working patch is very large (due to the need to change every
> > > smb.conf option), but it has not been feasible to make it smaller,
> > > mostly because it needs to rename .ptr to .offset at the same time.
> >
> > Have you thought of using macros in order to be able to make this in
> > steps ?
> > #define offset ptr
>
> Yes, I did try that, but I had difficulties with the other macros -
> GLOBAL_VAR and LOCAL_VAR.
>
> The bulk of the complexity is in the pointer manipulations (which can't
> be split) and not the search/replace. As such I don't see much value
> investing great efforts trying to get that intermediate step to work,
> but won't stop anyone else from giving it a try.
Of course as soon as I said that, I found it incredibly useful to split
the patches up, as I hunted for the subtle issue (offsetof(struct
loadparm_service, valid) == 0) that was breaking the patches :-)
Andrew Bartlett
--
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
More information about the samba-technical
mailing list