Log I/Os longer than zio_delay_max (30s default)
authorBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 25 Oct 2012 20:02:31 +0000 (13:02 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 2 Nov 2012 22:45:59 +0000 (15:45 -0700)
commit9dcb97198338ba2d8764dd5604b278118612f74d
tree4752e52379492cd45bdb5cd930496723dabed269
parente95853a331529a6cb96fdf10476c53441e59f4e1
Log I/Os longer than zio_delay_max (30s default)

There have been reports of ZFS deadlocking due to what appears to
be a lost IO.  This patch addes some debugging to determine the
exact state of the IO which neither 1) completed, 2) failed, or
3) timed out after zio_delay_max (30) seconds.

This information will be logged using the ZFS FMA infrastructure
as a 'delay' event and posted to the internal zevent log.  By
default the last 64 events will be kept in the log but the limit
is configurable via the zfs_zevent_len_max module option.

To dump the contents of the log use the 'zpool events -v' command
and look for the resource.fs.zfs.delay event.  It will include
various information about the pool, vdev, and zio which may shed
some light on the issue.

In the context of this change the 120 second kernel blocked thread
watchdog has been disabled for synchronous IOs.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #930
include/sys/fm/fs/zfs.h
module/zfs/zfs_fm.c
module/zfs/zio.c