From 76773e54f0f3c77f62aca9c5a680dff2173d88da Mon Sep 17 00:00:00 2001 From: Jorgen Lundman Date: Wed, 3 Apr 2024 10:16:40 +0900 Subject: [PATCH] Check for suspended pool in inactive Due to the atime sync in zfs_inactive() a suspended pool can stop Windows from rebooting. Signed-off-by: Jorgen Lundman --- module/os/windows/zfs/zfs_vnops_os.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/os/windows/zfs/zfs_vnops_os.c b/module/os/windows/zfs/zfs_vnops_os.c index 42d0e245bbb4..6f8eae4d83bc 100644 --- a/module/os/windows/zfs/zfs_vnops_os.c +++ b/module/os/windows/zfs/zfs_vnops_os.c @@ -3364,7 +3364,8 @@ zfs_inactive(struct vnode *vp) return; } - if (zp->z_atime_dirty && zp->z_unlinked == 0) { + if (zp->z_atime_dirty && zp->z_unlinked == 0 && + !spa_suspended(dmu_objset_spa(zfsvfs->z_os))) { dmu_tx_t *tx = dmu_tx_create(zfsvfs->z_os); dmu_tx_hold_sa(tx, zp->z_sa_hdl, B_FALSE);