How is supposed to be protected the units list?

Ed Maste emaste at freebsd.org
Wed Mar 3 21:56:27 UTC 2010


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


More information about the freebsd-scsi mailing list