[PATCH] group_mapping: Avoid a talloc

Andrew Bartlett abartlet at samba.org
Wed Jan 8 15:01:28 MST 2014

On Wed, 2014-01-08 at 13:35 -0800, Jeremy Allison wrote:
> On Thu, Jan 09, 2014 at 09:22:42AM +1300, Andrew Bartlett wrote:
> > 
> > I can see the argument for stuff in tight inner loops, but I'm very,
> > very wary of going back to fixed length strings everywhere.  What's the
> > whole argument of talloc_pool() that this was fast enough, without all
> > the risks of fixed length strings?
> > 
> > There is a great value in consistency of talloc-based string handling,
> > because it means that we can realistically examine our fixed length
> > string use, because it's rare, not used anywhere we might save a cycle
> > or two outside the hot path.
> > 
> > In short, I don't like where I see this headed, and I think we should
> > consider that.
> I can understand your reluctance on this. I also don't want
> to see us going back to fixed-length buffers - that way
> lies disaster :-).
> But I think you need to trust Volker a little more on
> this. Remember, this is something he's spend a *LOT* of
> time looking at, and if he thinks we need a fixed length
> value somewhere I'm inclined to give him the benefit of
> the doubt.

The issue I have is that the previous discussion ([PATCH] s3: set native
os according to Windows and NBT_ANNOUNCE_VERSION defines) was over code
used in session setup, and this instance is the only justification was:
"Hi!Please review & push!".  If someone says 'this is a hot path', then
I'm happy to go with that, but I just don't see how this is 'hot'
compared with the tdb access that must follow?

I'm still concerned, but a little explanation and justification would
greatly reduce my worries here, because it feels like the standard is
'remove all talloc where we think we can use a fixed string', rather
than 'remove avoidable talloc in the hot path'.


Andrew Bartlett

Andrew Bartlett
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba

More information about the samba-technical mailing list