From 7c8e4e31d52f625a23d256494ef84e13ded2828d Mon Sep 17 00:00:00 2001 From: Jorgen Lundman Date: Sun, 9 May 2021 15:18:41 +0900 Subject: [PATCH] Upstream: Test for NULL vd It seems we managed to get a deadman triggered during export? : 0xffffff8004ebda40 mach_kernel : _return_from_trap + 0xe0 : 0xffffff7f8942bbbf org.openzfsonosx.zfs : _vdev_deadman + 0x1f : 0xffffff7f8941149a org.openzfsonosx.zfs : _spa_deadman + 0xca : 0xffffff7f896a6246 org.openzfsonosx.zfs : _taskq_thread + 0x4a6 --- module/zfs/spa_misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/zfs/spa_misc.c b/module/zfs/spa_misc.c index 1a2e5abc5335..1e93980a9e40 100644 --- a/module/zfs/spa_misc.c +++ b/module/zfs/spa_misc.c @@ -616,7 +616,7 @@ spa_deadman(void *arg) zfs_dbgmsg("slow spa_sync: started %llu seconds ago, calls %llu", (gethrtime() - spa->spa_sync_starttime) / NANOSEC, ++spa->spa_deadman_calls); - if (zfs_deadman_enabled) + if (zfs_deadman_enabled && spa->spa_root_vdev != NULL) vdev_deadman(spa->spa_root_vdev, FTAG); spa->spa_deadman_tqid = taskq_dispatch_delay(system_delay_taskq,