HomeFreeBSD

zfs: fix panic if scrubbing after removing a slog device

Description

zfs: fix panic if scrubbing after removing a slog device

From openzfs-master 11f2e9a4 commit message:

vdev_ops: don't try to call vdev_op_hold or vdev_op_rele when NULL

This prevents a panic after a SLOG add/removal on the root pool followed
by a zpool scrub.

When a SLOG is removed, a hole takes its place - the vdev_ops for a hole
is vdev_hole_ops, which defines the handler functions of vdev_op_hold
and vdev_op_rele as NULL.

Patch Author: Patrick Mooney <pmooney@pfmooney.com>

Obtained from: openzfs/zfs@11f2e9a491baa2ae3fc00f6b8b892fa91a852ca1
PR: 252396
Approved by: re (gjb)

(cherry picked from commit 64649f0285424435634c2dfd39f49536fc2b50dd)

Details

Provenance
mmAuthored on Feb 22 2021, 5:05 PM
Parents
rGe680f3c0bd2b: loader: autoload_font will hung loader when there is no local console
Branches
Unknown
Tags
Unknown