Skip to content

Commit

Permalink
Check for suspended pool in inactive
Browse files Browse the repository at this point in the history
Due to the atime sync in zfs_inactive() a
suspended pool can stop Windows from rebooting.

Signed-off-by: Jorgen Lundman <[email protected]>
  • Loading branch information
lundman committed Apr 3, 2024
1 parent 0e4c16e commit 76773e5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion module/os/windows/zfs/zfs_vnops_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 76773e5

Please sign in to comment.