Fix negative zio->io_error which must be positive.
authorBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 27 Sep 2010 22:30:14 +0000 (15:30 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 12 Oct 2010 21:55:00 +0000 (14:55 -0700)
commitd148e95156b98ac226013d24962d1afa4a51c712
tree9c9226706d3dfe376197f9855d79a00a4043b1d6
parent398f129ca36b211b19b98ca16aff1d7e91ee2949
Fix negative zio->io_error which must be positive.

All the upper layers of zfs expect zio->io_error to be positive.  I was
careful but I missed one instance in vdev_disk_physio_completion() which
could return a negative error.  To ensure all cases are always caught I
had additionally added an ASSERT() to check this before zio_interpret().

Finally, as a debugging aid when zfs is build with --enable-debug all
errors from the backing block devices will be reported to the console
with an error message like this:

ZFS: zio error=5 type=1 offset=4217856 size=8192 flags=60440
module/zfs/vdev_disk.c