[PATCH] Remove all uses of talloc_autofree_context() from our code (except for test)

Volker Lendecke Volker.Lendecke at SerNet.DE
Thu Jul 27 06:33:14 UTC 2017


On Wed, Jul 26, 2017 at 12:47:11PM -0700, Jeremy Allison wrote:
> > You want multiple threads to utilize the async SMB features. Thread A
> > sitting in an open should not block thread B doing a readdir. Thread B
> > should be allowed to send and receive its readdir on the same
> > connection while thread A waits for its open to return. That's what
> > the python binding does. A big lock around all the synchronous entry
> > points would prevent this I believe.
> 
> To be honest I think doing this via multiple threads at the
> library calling level creating multiple libsmbclient contexts
> (i.e. multiple TCP connections) would probably be easier to
> initially implement for us and work just as well for the
> Gnome VFS. That way we have on big lock around the inital
> context create and setup, and then a context specific lock
> only allowing one outstanding call into the library on
> that context.

Just to state the obvious: I don't think we have separated our core
infrastructure enough to be thread-safe. So I'm not sure we can have
one libsmbclient context per thread. DEBUG being just a very obvious
example, name look a possible other one to look at. Then there's all
the Kerberos client stuff. Not sure about that. There's a LOT of code
libsmbclient depends upon. Don't get me wrong: We need to get this
right eventually, but it will be a looong journey.

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de



More information about the samba-technical mailing list