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

Volker Lendecke Volker.Lendecke at SerNet.DE
Wed Jul 26 15:53:13 UTC 2017


On Wed, Jul 26, 2017 at 08:43:29AM -0700, Jeremy Allison wrote:
> On Wed, Jul 26, 2017 at 08:41:14AM +0200, Volker Lendecke wrote:
> > On Tue, Jul 25, 2017 at 01:47:20PM -0700, Jeremy Allison wrote:
> > > Thinking about it some more, you're actually correct about
> > > this improving the libsmbclient libs without the null tracking
> > > removal change - the gnome VFS programs that use libsmbclient
> > > don't turn on null tracking. So I may have more room to experiment
> > > there..
> > 
> > libsmbclient depends on so much stuff that I believe this is hopeless.
> > For libsmbclient I believe that we need to have a separate compatible
> > ABI layer that is thread-safe but feeds the requests into our code
> > under a mutex. Much like source3/libsmb/pylibsmb.c does it.  From
> > there we can then add parallelism. Like the Linux kernel did ages ago
> > with its BKL removal efforts.
> 
> I'm not sure it's so hopeless. To make progress we need
> a BKL around the entry points to libsmbclient, and then
> we can slowly shrink the area under the lock.
> 
> Or did I just state the same thing as you said in a different way
> (I think I probably did :-).

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.

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