]> granicus.if.org Git - zfs/commitdiff
Update fix-taskq to never sleep at interrupt time
authorBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 14 Jun 2010 23:14:23 +0000 (16:14 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 14 Jun 2010 23:14:23 +0000 (16:14 -0700)
Updated fix to detect if we are in an interrupt and only sleep if it
is safe to do some.  I guess it must be safe to sleep under Solaris
this must be handled in a sort interrupt handler there

module/zfs/zio.c

index 88d80af4e99ff2ccd8a3e812234933a8be16bd4b..db9bb65fddef052c5c6757c6309dd87646c18f1a 100644 (file)
@@ -1048,7 +1048,10 @@ zio_taskq_dispatch(zio_t *zio, enum zio_taskq_type q, boolean_t cutinline)
 {
        spa_t *spa = zio->io_spa;
        zio_type_t t = zio->io_type;
-       int flags = TQ_SLEEP | (cutinline ? TQ_FRONT : 0);
+       int flags;
+
+       flags  = (cutinline ? TQ_FRONT : 0);
+       flags |= ((q == ZIO_TASKQ_INTERRUPT) ? TQ_NOSLEEP : TQ_SLEEP);
 
        /*
         * If we're a config writer or a probe, the normal issue and