Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Oct 2014 05:42:20 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r272583 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <201410060542.s965gKSn060213@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: delphij
Date: Mon Oct  6 05:42:20 2014
New Revision: 272583
URL: https://svnweb.freebsd.org/changeset/base/272583

Log:
  MFV r272500:
  
  Don't inherit flags other than DS_FLAG_CI_DATASET and DS_FLAG_INCONSISTENT
  when cloning.  This prevents DS_FLAG_DEFER_DESTROY being inherited from a
  clone that is marked for deferred destroy, which causes snapshots of the
  clone being destroyed when getting a hold or clone.
  
  Illumos issue:
      5150 zfs clone of a defer_destroy snapshot causes strangeness
  
  MFC after:	1 week

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c
Directory Properties:
  head/sys/cddl/contrib/opensolaris/   (props changed)

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c	Mon Oct  6 02:31:33 2014	(r272582)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c	Mon Oct  6 05:42:20 2014	(r272583)
@@ -21,7 +21,7 @@
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  * Portions Copyright (c) 2011 Martin Matuska <mm@FreeBSD.org>
- * Copyright (c) 2013, 2014 by Delphix. All rights reserved.
+ * Copyright (c) 2011, 2014 by Delphix. All rights reserved.
  * Copyright (c) 2014, Joyent, Inc. All rights reserved.
  * Copyright (c) 2014 RackTop Systems.
  */
@@ -699,7 +699,13 @@ dsl_dataset_create_sync_dd(dsl_dir_t *dd
 		dsphys->ds_uncompressed_bytes =
 		    origin->ds_phys->ds_uncompressed_bytes;
 		dsphys->ds_bp = origin->ds_phys->ds_bp;
-		dsphys->ds_flags |= origin->ds_phys->ds_flags;
+
+		/*
+		 * Inherit flags that describe the dataset's contents
+		 * (INCONSISTENT) or properties (Case Insensitive).
+		 */
+		dsphys->ds_flags |= origin->ds_phys->ds_flags &
+		    (DS_FLAG_INCONSISTENT | DS_FLAG_CI_DATASET);
 
 		dmu_buf_will_dirty(origin->ds_dbuf, tx);
 		origin->ds_phys->ds_num_children++;



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