Print this page
NEX-9673 Add capability to replicate cloned datasets relative to origin
Reviewed by: Alex Deiter <alex.deiter@nexenta.com>
Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
NEX-6855 System fails to boot up after a large number of datasets created
Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Revert "NEX-7251 Resume_token is not cleared right after finishing receive"
This reverts commit 9e97a45e8cf6ca59307a39e2d3c11c6e845e4187.
NEX-7251 Resume_token is not cleared right after finishing receive
Reviewed by: Alek Pinchuk <alek.pinchuk@nexenta.com>
Reviewed by: Alexey Komarov <alexey.komarov@nexenta.com>
NEX-5272 KRRP: replicate snapshot properties
Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
Reviewed by: Alexey Komarov <alexey.komarov@nexenta.com>
Reviewed by: Alex Aizman <alex.aizman@nexenta.com>
2605 want to resume interrupted zfs send
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Reviewed by: Xin Li <delphij@freebsd.org>
Reviewed by: Arne Jansen <sensille@gmx.net>
Approved by: Dan McDonald <danmcd@omniti.com>
6160 /usr/lib/fs/zfs/bootinstall should use bootadm
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Reviewed by: Adam Števko <adam.stevko@gmail.com>
Reviewed by: Josef Sipek <jeffpc@josefsipek.net>
Approved by: Richard Lowe <richlowe@richlowe.net>
4185 add new cryptographic checksums to ZFS: SHA-512, Skein, Edon-R (NULL is not an int)
6171 dsl_prop_unregister() slows down dataset eviction.
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
6047 SPARC boot should support feature@embedded_data
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Approved by: Dan McDonald <danmcd@omniti.com>
5959 clean up per-dataset feature count code
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: George Wilson <george@delphix.com>
Reviewed by: Alex Reece <alex@delphix.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
NEX-4582 update wrc test cases for allow to use write back cache per tree of datasets
Reviewed by: Steve Peng <steve.peng@nexenta.com>
Reviewed by: Alex Aizman <alex.aizman@nexenta.com>
5960 zfs recv should prefetch indirect blocks
5925 zfs receive -o origin=
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
5765 add support for estimating send stream size with lzc_send_space when source is a bookmark
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: Steven Hartland <killing@multiplay.co.uk>
Reviewed by: Bayard Bell <buffer.g.overflow@gmail.com>
Approved by: Albert Lee <trisk@nexenta.com>
NEX-3558 KRRP Integration
Fixup merge results
re #12585 rb4049 ZFS++ work port - refactoring to improve separation of open/closed code, bug fixes, performance improvements - open code
Bug 11205: add missing libzfs_closed_stubs.c to fix opensource-only build.
ZFS plus work: special vdevs, cos, cos/vdev properties

@@ -23,10 +23,11 @@
  * Copyright (c) 2011, 2017 by Delphix. All rights reserved.
  * Copyright (c) 2013, Joyent, Inc. All rights reserved.
  * Copyright (c) 2013 Steven Hartland. All rights reserved.
  * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved.
  * Copyright (c) 2014 Integros [integros.com]
+ * Copyright 2016 Nexenta Systems, Inc. All rights reserved.
  */
 
 #ifndef _SYS_DSL_DATASET_H
 #define _SYS_DSL_DATASET_H
 

@@ -99,22 +100,25 @@
 #define DS_FIELD_RESUME_LARGEBLOCK "com.delphix:resume_largeblockok"
 #define DS_FIELD_RESUME_EMBEDOK "com.delphix:resume_embedok"
 #define DS_FIELD_RESUME_COMPRESSOK "com.delphix:resume_compressok"
 
 /*
- * This field is set to the object number of the remap deadlist if one exists.
- */
-#define DS_FIELD_REMAP_DEADLIST "com.delphix:remap_deadlist"
-
-/*
  * DS_FLAG_CI_DATASET is set if the dataset contains a file system whose
  * name lookups should be performed case-insensitively.
  */
 #define DS_FLAG_CI_DATASET      (1ULL<<16)
 
 #define DS_CREATE_FLAG_NODIRTY  (1ULL<<24)
 
+typedef struct dsl_dataset_snapshot_arg {
+        nvlist_t *ddsa_snaps;
+        nvlist_t *ddsa_props;
+        nvlist_t *ddsa_errors;
+        cred_t *ddsa_cr;
+        boolean_t ddsa_autosnap;
+} dsl_dataset_snapshot_arg_t;
+
 typedef struct dsl_dataset_phys {
         uint64_t ds_dir_obj;            /* DMU_OT_DSL_DIR */
         uint64_t ds_prev_snap_obj;      /* DMU_OT_DSL_DATASET */
         uint64_t ds_prev_snap_txg;
         uint64_t ds_next_snap_obj;      /* DMU_OT_DSL_DATASET */

@@ -164,28 +168,10 @@
 
         /* has internal locking: */
         dsl_deadlist_t ds_deadlist;
         bplist_t ds_pending_deadlist;
 
-        /*
-         * The remap deadlist contains blocks (DVA's, really) that are
-         * referenced by the previous snapshot and point to indirect vdevs,
-         * but in this dataset they have been remapped to point to concrete
-         * (or at least, less-indirect) vdevs.  In other words, the
-         * physical DVA is referenced by the previous snapshot but not by
-         * this dataset.  Logically, the DVA continues to be referenced,
-         * but we are using a different (less indirect) physical DVA.
-         * This deadlist is used to determine when physical DVAs that
-         * point to indirect vdevs are no longer referenced anywhere,
-         * and thus should be marked obsolete.
-         *
-         * This is only used if SPA_FEATURE_OBSOLETE_COUNTS is enabled.
-         */
-        dsl_deadlist_t ds_remap_deadlist;
-        /* protects creation of the ds_remap_deadlist */
-        kmutex_t ds_remap_deadlist_lock;
-
         /* protected by lock on pool's dp_dirty_datasets list */
         txg_node_t ds_dirty_link;
         list_node_t ds_synced_link;
 
         /*

@@ -196,15 +182,31 @@
         objset_t *ds_objset;
         uint64_t ds_userrefs;
         void *ds_owner;
 
         /*
+         * NOTE: for pool with special device only
+         * Last transaction data was moved from special devices
+         * to other (regular) devices in a pool.
+         */
+        uint64_t ds_lstxg;
+
+        /*
+         * NOTE: for pool with special device only
+         * Level 0 bookmark we remembered when we were interrupted
+         * during traversal process. Used to resume traversal
+         * later.
+         */
+        zbookmark_phys_t ds_lszb;
+
+        /*
          * Long holds prevent the ds from being destroyed; they allow the
          * ds to remain held even after dropping the dp_config_rwlock.
          * Owning counts as a long hold.  See the comments above
          * dsl_pool_hold() for details.
          */
+
         refcount_t ds_longholds;
 
         /* no locking; only for making guesses */
         uint64_t ds_trysnap_txg;
 

@@ -265,17 +267,10 @@
         const char *ddra_tosnap;
         void *ddra_owner;
         nvlist_t *ddra_result;
 } dsl_dataset_rollback_arg_t;
 
-typedef struct dsl_dataset_snapshot_arg {
-        nvlist_t *ddsa_snaps;
-        nvlist_t *ddsa_props;
-        nvlist_t *ddsa_errors;
-        cred_t *ddsa_cr;
-} dsl_dataset_snapshot_arg_t;
-
 /*
  * The max length of a temporary tag prefix is the number of hex digits
  * required to express UINT64_MAX plus one for the hyphen.
  */
 #define MAX_TAG_PREFIX_LEN      17

@@ -331,12 +326,10 @@
 
 void dsl_dataset_block_born(dsl_dataset_t *ds, const blkptr_t *bp,
     dmu_tx_t *tx);
 int dsl_dataset_block_kill(dsl_dataset_t *ds, const blkptr_t *bp,
     dmu_tx_t *tx, boolean_t async);
-void dsl_dataset_block_remapped(dsl_dataset_t *ds, uint64_t vdev,
-    uint64_t offset, uint64_t size, uint64_t birth, dmu_tx_t *tx);
 
 void dsl_dataset_dirty(dsl_dataset_t *ds, dmu_tx_t *tx);
 
 int get_clones_stat_impl(dsl_dataset_t *ds, nvlist_t *val);
 char *get_receive_resume_stats_impl(dsl_dataset_t *ds);

@@ -420,15 +413,32 @@
 int dsl_dataset_rollback_check(void *arg, dmu_tx_t *tx);
 void dsl_dataset_rollback_sync(void *arg, dmu_tx_t *tx);
 int dsl_dataset_rollback(const char *fsname, const char *tosnap, void *owner,
     nvlist_t *result);
 
-uint64_t dsl_dataset_get_remap_deadlist_object(dsl_dataset_t *ds);
-void dsl_dataset_create_remap_deadlist(dsl_dataset_t *ds, dmu_tx_t *tx);
-boolean_t dsl_dataset_remap_deadlist_exists(dsl_dataset_t *ds);
-void dsl_dataset_destroy_remap_deadlist(dsl_dataset_t *ds, dmu_tx_t *tx);
+int dsl_dataset_snapshot_check(void *arg, dmu_tx_t *tx);
+void dsl_dataset_snapshot_sync(void *arg, dmu_tx_t *tx);
 
+typedef struct {
+        char name[ZFS_MAX_DATASET_NAME_LEN];
+        char origin_name[ZFS_MAX_DATASET_NAME_LEN];
+        uint64_t origin_guid;
+        uint64_t cookie;
+        boolean_t cookie_is_snap;
+        boolean_t top_level_ds;
+        dsl_dataset_t *ds;
+        list_node_t node;
+        avl_tree_t snapshots;
+} zfs_ds_collector_entry_t;
+
+uint64_t dsl_dataset_creation_txg(const char *name);
+
+boolean_t dataset_name_hidden(const char *name);
+
+zfs_ds_collector_entry_t *dsl_dataset_collector_cache_alloc();
+void dsl_dataset_collector_cache_free(zfs_ds_collector_entry_t *entry);
+
 void dsl_dataset_deactivate_feature(uint64_t dsobj,
     spa_feature_t f, dmu_tx_t *tx);
 
 #ifdef ZFS_DEBUG
 #define dprintf_ds(ds, fmt, ...) do { \