]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r364412:
authorAlan Somers <asomers@FreeBSD.org>
Sun, 30 Aug 2020 16:27:58 +0000 (16:27 +0000)
committerAlan Somers <asomers@FreeBSD.org>
Sun, 30 Aug 2020 16:27:58 +0000 (16:27 +0000)
commit16e9ce85d4feafcf0ff4ca26595f10b9b9c7fc09
treef585530d8a71f01042b7e1b0d97449f4b298c070
parent4ce2fcc7fe1fda0f41de91a7f7e6a58eb33e3c35
MFC r364412:

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
Reviewed by: mmacy
Sponsored by: Axcient
Differential Revision: https://reviews.freebsd.org/D26034
cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c