Skip to content

Commit

Permalink
vdev_file_io_start() to use taskq_dispatch(TQ_PUSHPAGE)
Browse files Browse the repository at this point in the history
The vdev_file_io_start() function may be processing a zio that the
txg_sync thread is waiting on.  In this case it is not safe to perform
memory allocations that may generate new I/O since this could cause a
deadlock.  To avoid this, call taskq_dispatch() with TQ_PUSHPAGE
instead of TQ_SLEEP.

Signed-off-by: Ned Bass <bass6@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue openzfs#1928
  • Loading branch information
nedbass authored and ryao committed Apr 9, 2014
1 parent 931849d commit d54dbfd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion module/zfs/vdev_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ vdev_file_io_start(zio_t *zio)
}

VERIFY3U(taskq_dispatch(system_taskq, vdev_file_io_strategy, zio,
TQ_SLEEP), !=, 0);
TQ_PUSHPAGE), !=, 0);

return (ZIO_PIPELINE_STOP);
}
Expand Down

0 comments on commit d54dbfd

Please sign in to comment.