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
F83436138: D26034.id75701.diff
Fri, May 10, 1:26 PM
Unknown Object (File)
Thu, Apr 25, 4:18 PM
Unknown Object (File)
Tue, Apr 23, 8:29 AM
Unknown Object (File)
Mar 28 2024, 9:52 AM
Unknown Object (File)
Feb 27 2024, 6:15 PM
Unknown Object (File)
Feb 7 2024, 2:51 PM
Unknown Object (File)
Jan 13 2024, 3:48 AM
Unknown Object (File)
Nov 15 2023, 1:56 AM
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