svn commit: r273704 - head/sys/cam/ata

Steven Hartland smh at FreeBSD.org
Sun Oct 26 18:41:02 UTC 2014


Author: smh
Date: Sun Oct 26 18:41:01 2014
New Revision: 273704
URL: https://svnweb.freebsd.org/changeset/base/273704

Log:
  Fix CF ERASE breakage caused by 268205.
  
  This prevents BIO_DELETE requests getting stuck in the TRIM queue which
  results in a panic on shutdown due to outstanding requests.
  
  PR:		194606
  Reported by:	Guido Falsi
  Reviewed by:	mav
  MFC after:	3 days
  Sponsored by:	Multiplay

Modified:
  head/sys/cam/ata/ata_da.c

Modified: head/sys/cam/ata/ata_da.c
==============================================================================
--- head/sys/cam/ata/ata_da.c	Sun Oct 26 18:30:35 2014	(r273703)
+++ head/sys/cam/ata/ata_da.c	Sun Oct 26 18:41:01 2014	(r273704)
@@ -1483,9 +1483,15 @@ ada_dsmtrim(struct ada_softc *softc, str
 static void
 ada_cfaerase(struct ada_softc *softc, struct bio *bp, struct ccb_ataio *ataio)
 {
+	struct trim_request *req = &softc->trim_req;
 	uint64_t lba = bp->bio_pblkno;
 	uint16_t count = bp->bio_bcount / softc->params.secsize;
 
+	bzero(req, sizeof(*req));
+	TAILQ_INIT(&req->bps);
+	bioq_remove(&softc->trim_queue, bp);
+	TAILQ_INSERT_TAIL(&req->bps, bp, bio_queue);
+
 	cam_fill_ataio(ataio,
 	    ada_retry_count,
 	    adadone,


More information about the svn-src-head mailing list