]> granicus.if.org Git - zfs/commit
Allow recovery from corrupted snapshot maps
authorTim Chase <tim@chase2k.com>
Sun, 23 Aug 2015 14:58:11 +0000 (09:58 -0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 28 Aug 2015 18:56:32 +0000 (11:56 -0700)
commitd439f63ff5ebc3ce0c96e8a284e9c642c4b7663c
treece81f03f9b4a7a8d3671bf429f6c9e7c6b9506ec
parent4cb7b9c5d42c831878e0cf90c845ed52a2a34d72
Allow recovery from corrupted snapshot maps

If the ZAP object containing a snapshot map is corrupted due to an
unrecoverable checksum error or otherwise, dsl_dataset_name() will
normally panic the system due to its VERIFY.

This patch attempts to allow a recovery avenue from such situations by
manufacturing a descriptive snapshot name and then ignoring the error.
Scrubbing a pool with this type of corruption will then show the affected
object in the error list rather than panicking.

The recovery code is only enabled when the zfs_recover module parameter
is set.

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #3705
module/zfs/dsl_dataset.c