Date: Fri, 01 Jun 2007 11:47:14 +0900 From: Hidetoshi Shimokawa <simokawa@FreeBSD.ORG> To: scottl@samsco.org Cc: freebsd-scsi@freebsd.org Subject: CAM locking Message-ID: <86wsyopf0t.wl%simokawa@FreeBSD.ORG>
next in thread | raw e-mail | index | archive | help
Hi Scott, Thank you for your work on CAM. I have some questions about lock assertion. 1. Now, xpt_done() should be called with a sim lock for QUEUED ccbs. Why don't you add an assertion in xpt_done()? 2. CAMDEBUG seems useless with WITNESS because xpt_path_path_id() requires a sim lock. Can we safely drop the assertion? I have some problem with scsi_target and I'll describe it in another mail. Regards, ============================================= (cd /usr/src && patch -p6) < diff_to_current ============================================= --- //depot/vendor/freebsd/src/sys/cam/cam_xpt.c 2007/05/16 17:02:05 +++ //depot/user/simokawa/firewire_lock/sys/cam/cam_xpt.c 2007/05/23 08:44:59 @@ -4222,7 +4222,9 @@ path_id_t xpt_path_path_id(struct cam_path *path) { +#if 0 mtx_assert(path->bus->sim->mtx, MA_OWNED); +#endif return(path->bus->path_id); } @@ -4840,6 +4842,7 @@ sim = done_ccb->ccb_h.path->bus->sim; switch (done_ccb->ccb_h.path->periph->type) { case CAM_PERIPH_BIO: + mtx_assert(sim->mtx, MA_OWNED); TAILQ_INSERT_TAIL(&sim->sim_doneq, &done_ccb->ccb_h, sim_links.tqe); done_ccb->ccb_h.pinfo.index = CAM_DONEQ_INDEX; /\ Hidetoshi Shimokawa \/ simokawa@FreeBSD.ORG
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86wsyopf0t.wl%simokawa>