Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 02 Mar 2010 07:34:46 -0800
From:      Matthew Jacob <mj@feral.com>
To:        freebsd-scsi@freebsd.org
Subject:   Re: How is supposed to be protected the units list?
Message-ID:  <4B8D3016.2070301@feral.com>
In-Reply-To: <3bbf2fe11003020724m14bebf74y9fa3906418b7cf11@mail.gmail.com>
References:  <3bbf2fe11002281655i61a5f0a0if3f381ad0c4a1ef8@mail.gmail.com> <3bbf2fe11003020724m14bebf74y9fa3906418b7cf11@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
I will admit to not looking at this stuff closely. But I'll also test 
with this today and give back an opinion.
I would really like to hear Scott, Ken, Alexander or Justin express an 
opinion on this.

> 2010/3/1 Attilio Rao<attilio@freebsd.org>:
>    
>> Hello,
>> I have a question that I've been unable to reply reading the code.
>> Someone could point me to documentation explaining how the unit tailq
>> (within a struct periph_driver) is supposed to be locked?
>> I'm not sure how it is assured consistency of accesses to the list and
>> more important how is ensured that the periphs composing it doesn't go
>> away as I don't see any reference bump for objects inserted there.
>>      
> I don't think the lists are protected at all so I made this simple
> patch taking advantage by a global lock:
> http://www.freebsd.org/~attilio/Sandvine/pdrv/pdrv_lock.diff
>
> The patch is simple enough but I just test-compiled it (will need some
> time to run in a debugging kernel, hope to do tonight) and maybe you
> can already give your opinions here.
>
> Thanks,
> Attilio
>
>
>    




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4B8D3016.2070301>