Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Nov 2016 11:46:22 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org
Subject:   svn commit: r308986 - vendor/illumos/dist/lib/libzfs/common
Message-ID:  <201611221146.uAMBkM47012230@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Tue Nov 22 11:46:22 2016
New Revision: 308986
URL: https://svnweb.freebsd.org/changeset/base/308986

Log:
  6412 zfs receive: -u can be ignored sometimes
  
  illumos/illumos-gate@9185393f2919d8b897f6142d8a9fa0429c285dc1
  https://github.com/illumos/illumos-gate/commit/9185393f2919d8b897f6142d8a9fa0429c285dc1
  
  https://www.illumos.org/issues/6412
    It seems that zfs receive -F -u would mount a received filesystem after
    receiving a full stream if a destination filesystem already existed (and, thus,
    got destroyed and re-created) and was mounted.
    How to reproduce:
    $ zfs create rpool/sandbox
    $ zfs create rpool/sandbox/from
    $ zfs create rpool/sandbox/to
    $ zfs snap rpool/sandbox/from@snap
    $ zfs send rpool/sandbox/from@snap | zfs recv -v -F -u rpool/sandbox/to
    receiving full stream of rpool/sandbox/from@snap into rpool/sandbox/to@snap
    received 41.7KB stream in 1 seconds (41.7KB/sec)
    $ zfs get mounted rpool/sandbox/to
    NAME                  PROPERTY  VALUE    SOURCE
    rpool/tmp/sandbox/to  mounted   yes      -
    This behavior can be problematic if the mountpoint property changes either
    because it had a non-inherited value or the stream contains properties because
    it has been generated with either -R or -p.
  
  Reviewed by: Matthew Ahrens <mahrens@delphix.com>
  Reviewed by: Paul Dagnelie <pcd@delphix.com>
  Approved by: Richard Lowe <richlowe@richlowe.net>
  Author: Andriy Gapon <andriy.gapon@clusterhq.com>

Modified:
  vendor/illumos/dist/lib/libzfs/common/libzfs_sendrecv.c

Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_sendrecv.c
==============================================================================
--- vendor/illumos/dist/lib/libzfs/common/libzfs_sendrecv.c	Tue Nov 22 11:44:30 2016	(r308985)
+++ vendor/illumos/dist/lib/libzfs/common/libzfs_sendrecv.c	Tue Nov 22 11:46:22 2016	(r308986)
@@ -3533,7 +3533,8 @@ zfs_receive_one(libzfs_handle_t *hdl, in
 	}
 
 	if (clp) {
-		err |= changelist_postfix(clp);
+		if (!flags->nomount)
+			err |= changelist_postfix(clp);
 		changelist_free(clp);
 	}
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201611221146.uAMBkM47012230>