panic: detach with active requests on 10.1-RC3

Steven Hartland killing at multiplay.co.uk
Sun Oct 26 17:24:52 UTC 2014


On 26/10/2014 15:58, Guido Falsi wrote:
>
>>> I bisected commits and finally found out this happens starting with
>>> r268815, which MFCed r268205.
>>>
>>> It is related to trim support, in fact disabling trim on the filesystm
>>> "fixes" it.
>>>
>>> I filed bug #194606 on bugzilla [1] to further track this issue, if
>>> anyone is interested.
>>>
>>> [1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194606
>> Nice work Guido, can you try the attached patch and see if that fixes it
>> please?
> Sure, I'll report back ASAP

Actually looks like the fix requires more changes than I first thought, 
updated patch attached.

     Regards
     Steve
-------------- next part --------------
Index: sys/cam/ata/ata_da.c
===================================================================
--- sys/cam/ata/ata_da.c	(revision 273157)
+++ sys/cam/ata/ata_da.c	(working copy)
@@ -1467,9 +1467,15 @@ ada_dsmtrim(struct ada_softc *softc, struct bio *b
 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 freebsd-fs mailing list