Page MenuHomeFreeBSD

zfs: fix EIO accessing dataset after resuming interrupted receive
ClosedPublic

Authored by asomers on Aug 11 2020, 8:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Mar 8, 2:47 AM
Unknown Object (File)
Wed, Mar 5, 8:03 AM
Unknown Object (File)
Wed, Mar 5, 7:34 AM
Unknown Object (File)
Wed, Mar 5, 2:28 AM
Unknown Object (File)
Jan 18 2025, 6:47 AM
Unknown Object (File)
Nov 22 2024, 11:18 AM
Unknown Object (File)
Nov 14 2024, 9:09 AM
Unknown Object (File)
Nov 4 2024, 4:11 PM
Subscribers

Details

Summary

zfs: fix EIO accessing dataset after resuming interrupted receive

ZFS unmounts a dataset while receiving into it and remounts it afterwards.
But if ZFS is resuming an incomplete receive, it screws up and ends up with
a dataset that is mounted, but returns EIO for every access. This commit
fixes that condition.

While the vulnerable code also exists in OpenZFS, the problem is not
reproducible there. Apparently OpenZFS doesn't unmount the destination
dataset during receive, like FreeBSD does.

PR: 248606

Test Plan

ZFS test suite, plus instructions attached to PR

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 32927
Build 30325: arc lint + arc unit