summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsmh <smh@FreeBSD.org>2014-10-26 18:41:01 +0000
committersmh <smh@FreeBSD.org>2014-10-26 18:41:01 +0000
commit49292da84478e126422828e82a59e5204e98b6f1 (patch)
treedeb932aa6d6e0121465d40e6a1e955b5decf0608
parent3aefca10737d3482e69ecc3cd2040e794331bfe9 (diff)
downloadFreeBSD-src-49292da84478e126422828e82a59e5204e98b6f1.zip
FreeBSD-src-49292da84478e126422828e82a59e5204e98b6f1.tar.gz
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
-rw-r--r--sys/cam/ata/ata_da.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/cam/ata/ata_da.c b/sys/cam/ata/ata_da.c
index 8f98d14..bc95ab8 100644
--- a/sys/cam/ata/ata_da.c
+++ b/sys/cam/ata/ata_da.c
@@ -1483,9 +1483,15 @@ ada_dsmtrim(struct ada_softc *softc, struct bio *bp, struct ccb_ataio *ataio)
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,
OpenPOWER on IntegriCloud