]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
ZFS: fix spurious EBUSY after zfs receive to an existing dataset
authorAlan Somers <asomers@FreeBSD.org>
Wed, 9 Dec 2020 20:06:37 +0000 (20:06 +0000)
committerAlan Somers <asomers@FreeBSD.org>
Wed, 9 Dec 2020 20:06:37 +0000 (20:06 +0000)
commite74048a7031a3d05a8974cf09c09547525b20e93
tree7886bc014f8468e8d7db1cbc81dd8e8b1ea74cae
parenta056ae0cc76cfa341bc45daec7dd3d301fb6eb4d
ZFS: fix spurious EBUSY after zfs receive to an existing dataset

If you do a "zfs send -p <src> | zfs receive -F <dst>" to an existing but
empty dataset, the receive will complete successfully but spuriously fail
with exit status 1 and the message "cannot mount 'pool/dataset': mountpoint
or dataset is busy".

The root cause is a merge error made in r344569 and MFCed in r345578, which
merged changes a10d50f999 and e63ac16d25 from ZoL.  The merge:
* failed to flip a == to an != like the upstream change did, and
* Left out one chunk

Direct commit to stable/12 because head has moved on to OpenZFS.

PR: 251694
Reviewed by: bapt
Sponsored by: Axcient
cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c