]> git.proxmox.com Git - mirror_zfs.git/commit
Improved error handling for extreme rewinds
authorBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 9 Oct 2018 22:42:42 +0000 (15:42 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 12 Oct 2018 18:24:04 +0000 (11:24 -0700)
commit27f80e85c2649573af3c3d915baf6d4195538583
treec95cbc3d0bb78e97ab9071ccb4e7355d81f5315f
parentd6c745830f2529643f1967e1f8a5d0abacba4585
Improved error handling for extreme rewinds

The vdev_checkpoint_sm_object(), vdev_obsolete_sm_object(), and
vdev_obsolete_counts_are_precise() functions assume that the
only way a zap_lookup() can fail is if the requested entry is
missing.  While this is the most common cause, it's not the only
cause.  Attemping to access a damaged ZAP will result in other
errors.

The most likely scenario for accessing a damaged ZAP is during
an extreme rewind pool import.  Under these conditions the pool
is expected to contain damaged objects and the import code was
updated to handle this gracefully.  Getting an ECKSUM error from
these ZAPs after the pool in import a far less likely, therefore
the behavior for call paths was not modified.

Reviewed-by: Tim Chase <tim@chase2k.com>
Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Serapheim Dimitropoulos <serapheim.dimitro@delphix.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #7809
Closes #7921
cmd/zdb/zdb.c
include/sys/vdev_impl.h
module/zfs/spa.c
module/zfs/vdev.c
module/zfs/vdev_indirect.c
module/zfs/vdev_removal.c