From: Brian Behlendorf Date: Mon, 28 Jun 2010 17:11:12 +0000 (-0700) Subject: Never sleep under taskq_dispatch() X-Git-Tag: zfs-0.5.0~38^2^2~1^2^2~21^2^2^2~2^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6914386b8590fed6be580170481b1cf9016a59b6;p=zfs Never sleep under taskq_dispatch() There are cases where under Linux it is not safe to sleep in taskq_dispatch(). Rather than adding Linux specific code to detect these cases I opted to keep it simple and just never allow a sleep here. The impact of this should be minimal. --- diff --git a/module/zfs/zio.c b/module/zfs/zio.c index db9bb65fd..341f00306 100644 --- a/module/zfs/zio.c +++ b/module/zfs/zio.c @@ -1048,10 +1048,7 @@ 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; - - flags = (cutinline ? TQ_FRONT : 0); - flags |= ((q == ZIO_TASKQ_INTERRUPT) ? TQ_NOSLEEP : TQ_SLEEP); + int flags = TQ_NOSLEEP | (cutinline ? TQ_FRONT : 0); /* * If we're a config writer or a probe, the normal issue and