[SCM] Samba Shared Repository - branch master updated

Volker Lendecke Volker.Lendecke at SerNet.DE
Thu Dec 18 04:56:27 MST 2014


On Wed, Dec 17, 2014 at 04:36:03PM +0100, Günther Deschner wrote:
> +	/*
> +	 * Store the reqs that needs to be completed by calling
> +	 * tevent_req_done(). tevent_req_done() cannot be called
> +	 * here, as it is not designed to be executed in the
> +	 * multithread environment, tevent_req_done() should be
> +	 * executed from the smbd main thread.
> +	 */
> +	pthread_mutex_lock (&lock_req_list);
> +	{
> +		for (i = 0 ; i < aio_pending_size ; i++) {
> +			if(!req_producer_list[i]) {
> +				req_producer_list[i] = req;
> +				req_counter = req_counter + 1;
> +				break;
> +			}
> +		}
> +	}
> +	pthread_mutex_unlock (&lock_req_list);

One thing that just struck me (and that it took so long to
figure this out is a bad sign to me): Wherever there's a
pthread_mutex_lock call there needs to be the corresponding
pthread_atfork handler. smbd expects to be able to fork
properly, I know of an internal VFS module that does this.
And we have a module vfs_aio_fork that might be applied to
a different share. So we need to maintain forkability. With
the phreadpool approach I've tried to take care of this (if
that's not complete, please tell me!).

As I've not found documentation about the gluster aio
interface, can we get confirmation from the developers of
the gluster library that this is being taken care of?

Thanks!

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