From owner-svn-src-releng@freebsd.org Tue Oct 6 15:17:42 2020 Return-Path: Delivered-To: svn-src-releng@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4D13A4356C4; Tue, 6 Oct 2020 15:17:42 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C5LgV1J7zz4bBs; Tue, 6 Oct 2020 15:17:42 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1082F8C58; Tue, 6 Oct 2020 15:17:42 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 096FHfgv074774; Tue, 6 Oct 2020 15:17:41 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 096FHf3T074773; Tue, 6 Oct 2020 15:17:41 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <202010061517.096FHf3T074773@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 6 Oct 2020 15:17:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r366490 - releng/12.2/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Group: releng X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: releng/12.2/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Commit-Revision: 366490 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-releng@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the release engineering / security commits to the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2020 15:17:42 -0000 Author: gjb Date: Tue Oct 6 15:17:41 2020 New Revision: 366490 URL: https://svnweb.freebsd.org/changeset/base/366490 Log: MFS12 r366180, r366341: r366180 (asomers): Fix resuming receive stream to dataset with mounted clone r366341 (asomers): Fix "zfs receive" of interrupted stream without "-F" Approved by: re (kib) Sponsored by: Rubicon Communications, LLC (netgate.com) Modified: releng/12.2/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Directory Properties: releng/12.2/ (props changed) Modified: releng/12.2/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c ============================================================================== --- releng/12.2/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Tue Oct 6 14:26:05 2020 (r366489) +++ releng/12.2/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Tue Oct 6 15:17:41 2020 (r366490) @@ -3138,7 +3138,7 @@ zfs_receive_one(libzfs_handle_t *hdl, int infd, const char prop_errbuf[1024]; const char *chopprefix; boolean_t newfs = B_FALSE; - boolean_t stream_wantsnewfs; + boolean_t stream_wantsnewfs, stream_resumingnewfs; uint64_t parent_snapguid = 0; prop_changelist_t *clp = NULL; nvlist_t *snapprops_nvlist = NULL; @@ -3302,6 +3302,8 @@ zfs_receive_one(libzfs_handle_t *hdl, int infd, const DMU_BACKUP_FEATURE_RESUMING; stream_wantsnewfs = (drrb->drr_fromguid == 0 || (drrb->drr_flags & DRR_FLAG_CLONE) || originsnap) && !resuming; + stream_resumingnewfs = (drrb->drr_fromguid == 0 || + (drrb->drr_flags & DRR_FLAG_CLONE) || originsnap) && resuming; if (stream_wantsnewfs) { /* @@ -3433,7 +3435,7 @@ zfs_receive_one(libzfs_handle_t *hdl, int infd, const } if (!flags->dryrun && zhp->zfs_type == ZFS_TYPE_FILESYSTEM && - (stream_wantsnewfs || resuming)) { + (stream_wantsnewfs || stream_resumingnewfs)) { /* We can't do online recv in this case */ clp = changelist_gather(zhp, ZFS_PROP_NAME, 0, 0); if (clp == NULL) {