Date: Wed, 3 Mar 2010 16:44:24 -0500 From: Ed Maste <emaste@freebsd.org> To: Attilio Rao <attilio@freebsd.org> Cc: freebsd-scsi@freebsd.org, Matthew Jacob <mj@feral.com> Subject: Re: How is supposed to be protected the units list? Message-ID: <20100303214424.GA53790@sandvine.com> In-Reply-To: <3bbf2fe11003031334g4591c1a3lc52dfb898f728ee2@mail.gmail.com> References: <3bbf2fe11002281655i61a5f0a0if3f381ad0c4a1ef8@mail.gmail.com> <3bbf2fe11003020724m14bebf74y9fa3906418b7cf11@mail.gmail.com> <4B8D3016.2070301@feral.com> <3bbf2fe11003031334g4591c1a3lc52dfb898f728ee2@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Mar 03, 2010 at 10:34:36PM +0100, Attilio Rao wrote: > So I stress-tested the patch for several hours (6-7) with a > stress-test that could reproduce the bug for us, on a debugging > kernel, and it didn't panic'ed or showed LORs, deadlock, etc. > > If someone could offer time for reviews or futher examinations it > would be very much appreciated. I reviewed the patch and am happy with it. My only comment is to consider using macros for the lock/unlock; it seems to be a pretty common idiom. #define FOO_LOCK_INIT() \ mtx_init(&foo_mtx, "foo lock", NULL, MTX_DEF) #define FOO_LOCK_ASSERT() mtx_assert(&foo_mtx, MA_OWNED) #define FOO_LOCK() mtx_lock(&foo_mtx) #define FOO_UNLOCK() mtx_unlock(&foo_mtx) Regards, Ed
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100303214424.GA53790>