mirror_zfs/module
Matthew Ahrens 3a92552f75
Fix error handling of vdev_top_zap
In `vdev_load()`, we look up several entries in the `vdev_top_zap`
object.  In most cases, if we encounter an i/o error, it will be
returned to the caller.  However, when handling
`VDEV_TOP_ZAP_ALLOCATION_BIAS`, if we get an i/o error, we may continue
on, which in theory could cause us to not realize that a vdev should be
used only for `special` allocations.

In practice, if we encountered an i/o error while looking for
`VDEV_TOP_ZAP_ALLOCATION_BIAS` in the `vdev_top_zap`, we'd also get an
i/o error while looking for other entries in the same object, and thus
the zpool open/import would fail.  Therefore the impact of this problem
is negligible.

This commit adds error handling for i/o errors while accessing the
`vdev_top_zap`, so that we aren't relying on unrelated code to fail for
us.

Reviewed-by: Don Brady <don.brady@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Matthew Ahrens <mahrens@delphix.com>
Closes #10637
2020-07-29 17:04:34 -07:00
..
avl Make use of ZFS_DEBUG consistent within kmod sources 2020-07-25 20:07:44 -07:00
icp Prefix zfs internal endian checks with _ZFS 2020-07-28 13:02:49 -07:00
lua Fix lua stack overflow on recursive call to gsub() 2020-07-27 16:11:47 -07:00
nvpair Prefix zfs internal endian checks with _ZFS 2020-07-28 13:02:49 -07:00
os Rename refcount.h to zfs_refcount.h 2020-07-29 16:35:33 -07:00
spl Cleanup linux module kbuild files 2020-06-10 09:24:15 -07:00
unicode Prefix zfs internal endian checks with _ZFS 2020-07-28 13:02:49 -07:00
zcommon Refactor ccompile.h to not include system headers 2020-07-25 20:09:50 -07:00
zfs Fix error handling of vdev_top_zap 2020-07-29 17:04:34 -07:00
.gitignore Cleanup linux module kbuild files 2020-06-10 09:24:15 -07:00
Kbuild.in Move zfs_gitrev.h to build directory 2020-06-24 18:19:28 -07:00
Makefile.bsd Prefix zfs internal endian checks with _ZFS 2020-07-28 13:02:49 -07:00
Makefile.in Include FreeBSD sources in module dist 2020-06-26 14:19:35 -07:00