Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: amd64 -current panics



ci4ic4%gmail.com@localhost (Chavdar Ivanov) writes:

>#6  0xffffffff801529b9 in scsipi_done ()
>#7  0xffffffff8043d5fe in mpt_drain_queue ()
>#8  0xffffffff8043dccd in mpt_intr ()

>sd1: busy < 0
>panic: iostat_unbusy

Every I/O request increments a busy counter when issued to the controller
and decrements the busy counter when completed.

Somehow the counter went negative, probably because the code now
runs outside of the big kernel lock.

Can you try the following patch to see wether it stops the panic?

--- sd.c.ORIG	2016-12-03 13:02:24.000000000 +0100
+++ sd.c.NEW	2016-12-03 13:03:02.000000000 +0100
@@ -966,8 +966,10 @@
 			bp->b_resid = bp->b_bcount;
 		}
 
+		KERNEL_LOCK(1, NULL);
 		disk_unbusy(&sd->sc_dk, bp->b_bcount - bp->b_resid,
 		    (bp->b_flags & B_READ));
+		KERNEL_UNLOCK_ONE(NULL);
 		rnd_add_uint32(&sd->rnd_source, bp->b_rawblkno);
 
 		biodone(bp);

-- 
-- 
                                Michael van Elst
Internet: mlelstv%serpens.de@localhost
                                "A potential Snark may lurk in every tree."


Home | Main Index | Thread Index | Old Index