HomeFreeBSD

MFOpenZFS: Add zio_ddt_free()+ddt_phys_decref() error handling

Description

MFOpenZFS: Add zio_ddt_free()+ddt_phys_decref() error handling

The assumption in zio_ddt_free() is that ddt_phys_select() must
always find a match. However, if that fails due to a damaged
DDT or some other reason the code will NULL dereference in
ddt_phys_decref().

While this should never happen it has been observed on various
platforms. The result is that unless your willing to patch the
ZFS code the pool is inaccessible. Therefore, we're choosing
to more gracefully handle this case rather than leave it fatal.

http://mail.opensolaris.org/pipermail/zfs-discuss/2012-February/050972.html

https://github.com/openzfs/zfs/commit/5dc6af0eec29b119b731c793037fd77214fc9438

Reported by: Pierre Beyssac
Obtained from: OpenZFS
MFC after: 2 weeks
Sponsored by: Klara Inc.

Details

Provenance
allanjudeAuthored on Jun 22 2020, 7:03 PM
Parents
rG8e47856b2fe8: Followup to r362502: rc.conf(5): unobsolete gif_interfaces
Branches
Unknown
Tags
Unknown

Event Timeline