Date: Fri, 18 Jul 2008 11:44:40 -0700 (PDT) From: Pedro Giffuni <pfgshield-freebsd@yahoo.com> To: freebsd-scsi@FreeBSD.org Subject: CAM bugs found in DragonFly Message-ID: <37593.67811.qm@web32702.mail.mud.yahoo.com>
next in thread | raw e-mail | index | archive | help
(I sent some private mail about this but maybe it is of more general intere= st) Hi; Matt Dillon has been doing some robustness "don't try this at home" experim= ents with his new filesystem : basically unplugging the USB cord while maki= ng use of it. Our code has diverged a lot but surely some of his enhancements would impro= ve FreeBSD too: http://leaf.dragonflybsd.org/mailarchive/commits/2008-07/msg00242.html ___________ dillon 2008/07/17 17:07:23 PDT DragonFly src repository Modified files: sys/bus/cam cam_periph.c cam_periph.h cam_sim.c=20 cam_sim.h cam_xpt.c=20 sys/bus/cam/scsi scsi_cd.c scsi_ch.c scsi_da.c scsi_sa.c=20 scsi_target.c=20 Log: Fix multiple bugs in CAM related devices which go away unexpectedly. Thi= s fixes numerous panics when pulling a USB mass media device in the midst o= f heavy I/O. =20 * The SIM lock was being unlocked via the periph->sim path after periph was unheld. periph can become free and blow up the unlock, so get the sim into a local variable first, then release periph. =20 * The code which waits for CCB completion needs to be a while loop, not an if. It worked anyway, but wasn't very robust. =20 * Add CAM_SIM_DEREGISTERED to flag when a sim is undergoing deregistratio= n. =20 * Beef up cam_dead_sim so it works more like a real sim. =20 * Properly install &cam_dead_sim in the device and periph structures related to a SCSI bus, when deregistering the bus. =20 * Disallow the addition of new devices when deregistering a bus. =20 * NULL out periph->softc when freeing it. =20 Revision Changes Path 1.41 +13 -6 src/sys/bus/cam/cam_periph.c 1.12 +1 -1 src/sys/bus/cam/cam_periph.h 1.13 +18 -4 src/sys/bus/cam/cam_sim.c 1.9 +2 -0 src/sys/bus/cam/cam_sim.h 1.67 +96 -24 src/sys/bus/cam/cam_xpt.c 1.44 +5 -11 src/sys/bus/cam/scsi/scsi_cd.c 1.28 +4 -6 src/sys/bus/cam/scsi/scsi_ch.c 1.58 +4 -5 src/sys/bus/cam/scsi/scsi_da.c 1.36 +14 -18 src/sys/bus/cam/scsi/scsi_sa.c 1.20 +1 -1 src/sys/bus/cam/scsi/scsi_target.c=0A=0A=0A Pos= ta, news, sport, oroscopo: tutto in una sola pagina. =0ACrea l'home pag= e che piace a te!=0Awww.yahoo.it/latuapagina
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?37593.67811.qm>