Allow dsl_deadlist_open() return errors
commitc33a55b0c201dce9457bc6632f68fc87a903a6af
authorAlexander Motin <mav@FreeBSD.org>
Wed, 4 Dec 2024 23:15:58 +0000 (4 18:15 -0500)
committerGitHub <noreply@github.com>
Wed, 4 Dec 2024 23:15:58 +0000 (4 15:15 -0800)
tree03057a9c882bfcde5752f63eb571313bde9cf04b
parent0e020bf3e12d4993d8720292f15a4fead45cd597
Allow dsl_deadlist_open() return errors

In some cases like dsl_dataset_hold_obj() it is possible to handle
those errors, so failure to hold dataset should be better than
kernel panic.  Some other places where these errors are still not
handled but asserted should be less dangerous just as unreachable.

We have a user report about pool corruption leading to assertions
on these errors.  Hopefully this will make behavior a bit nicer.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Closes #16836
cmd/zdb/zdb.c
include/sys/dsl_deadlist.h
include/sys/dsl_dir.h
module/zfs/dsl_dataset.c
module/zfs/dsl_deadlist.c
module/zfs/dsl_destroy.c
module/zfs/dsl_dir.c
module/zfs/spa.c