[sheepdog] [PATCH v2 2/4] work: protect nr_threads by wi->startup_lock

Hitoshi Mitake mitake.hitoshi at gmail.com
Wed Dec 18 05:15:39 CET 2013


At Wed, 18 Dec 2013 11:41:39 +0800,
Liu Yuan wrote:
> 
> On Tue, Dec 17, 2013 at 11:42:54PM +0900, Hitoshi Mitake wrote:
> > Previous protection scheme of wi->nr_thread in work.c was
> > unclear. This patch let work.c protect wi->nr_thread by
> > wi->startup_lock.
> > 
> 
> I don't understand what you meant by 'unclear'. Could make it clear that
> what exactly you think is 'unclear'.

I meant that current wi->nr_thread is protected by wi->pending_lock and it is
unclear. Sorry, my description was too slack.

> 
> By name startup_lock means to protect something at startup, so we can't abuse
> it. If we really want to duplex it, we need to give it a new name first.
> 

OK, let's add a new mutex for changing the number of threads.

Thanks,
Hitoshi



More information about the sheepdog mailing list