/[base]
ViewVC logotype

Revision 366180


Jump to revision: Previous Next
Author: asomers
Date: Sat Sep 26 02:50:28 2020 UTC (3 years, 9 months ago)
Changed paths: 1
Log Message:
zfs: Fix resuming receive stream to dataset with mounted clone

My fix for bug 248606 (zfs receive: Input/output error accessing dataset
after resuming interrupted receive), r364412, introduced a regression:
attempting to resume a receive into a dataset with a mounted clone would
fail if that clone were in-use.  This change reverts r364412 and fixes it in
a better way.

Background:
When ZFS receives a stream, it may decide to unmount and remount the
destination and all of its children.  However, ever since resumable
send/receive was implemented, ZFS has skipped the unmount/remount step when
resuming a stream.  I don't know why.

That let to bug 248606.  When resuming the stream, ZFS didn't unmount and
remount the destination, leaving a destroyed dataset mounted.

My original fix was to always unmount and remount when resuming a receive,
but that caused other problems, like bug 249579.  A better solution is to
unmount and remount when resuming a receive of a stream that would've
unmounted and remounted when it was new.

Direct commit to stable/12 because head has moved to OpenZFS.  The bug
exists there, too, but a change to the OpenZFS code can't be merged to the
old ZFS code.

PR:		249579
Reviewed by:	mmacy
MFC after:	1 week
Sponsored by:	Axcient


Changed paths

Path Details
Directorystable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c modified , text changed

  ViewVC Help
Powered by ViewVC 1.1.27