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
F135911085: D26034.id75701.diff
Fri, Nov 14, 2:10 AM
Unknown Object (File)
Thu, Nov 13, 8:53 PM
Unknown Object (File)
Sun, Oct 26, 9:12 AM
Unknown Object (File)
Sat, Oct 25, 7:05 AM
Unknown Object (File)
Tue, Oct 21, 6:00 PM
Unknown Object (File)
Tue, Oct 21, 5:55 PM
Unknown Object (File)
Tue, Oct 21, 5:55 PM
Unknown Object (File)
Tue, Oct 21, 5:51 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
Lint Not Applicable
Unit
Tests Not Applicable