]> git.proxmox.com Git - mirror_zfs.git/blobdiff - include/sys/spa_impl.h
ztest: scrub ddt repair
[mirror_zfs.git] / include / sys / spa_impl.h
index 1b8e4818057b97dba0a603bf6a0d7274614c6556..404aaa9ee37380594ad07c0a5bc7e63240b90d0e 100644 (file)
  */
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2011, 2017 by Delphix. All rights reserved.
+ * Copyright (c) 2011, 2018 by Delphix. All rights reserved.
  * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
  * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved.
  * Copyright 2013 Saso Kiselkov. All rights reserved.
  * Copyright (c) 2016 Actifio, Inc. All rights reserved.
  * Copyright (c) 2017 Datto Inc.
+ * Copyright (c) 2017, Intel Corporation.
  */
 
 #ifndef _SYS_SPA_IMPL_H
@@ -138,7 +139,7 @@ typedef struct spa_config_lock {
        kthread_t       *scl_writer;
        int             scl_write_wanted;
        kcondvar_t      scl_cv;
-       refcount_t      scl_count;
+       zfs_refcount_t  scl_count;
 } spa_config_lock_t;
 
 typedef struct spa_config_dirent {
@@ -220,6 +221,8 @@ struct spa {
        boolean_t       spa_is_initializing;    /* true while opening pool */
        metaslab_class_t *spa_normal_class;     /* normal data class */
        metaslab_class_t *spa_log_class;        /* intent log data class */
+       metaslab_class_t *spa_special_class;    /* special allocation class */
+       metaslab_class_t *spa_dedup_class;      /* dedup allocation class */
        uint64_t        spa_first_txg;          /* first txg after spa_open() */
        uint64_t        spa_final_txg;          /* txg of export/destroy */
        uint64_t        spa_freeze_txg;         /* freeze pool at this txg */
@@ -278,6 +281,13 @@ struct spa {
        uint64_t        spa_scan_pass_scrub_spent_paused; /* total paused */
        uint64_t        spa_scan_pass_exam;     /* examined bytes per pass */
        uint64_t        spa_scan_pass_issued;   /* issued bytes per pass */
+
+       /*
+        * We are in the middle of a resilver, and another resilver
+        * is needed once this one completes. This is set iff any
+        * vdev_resilver_deferred is set.
+        */
+       boolean_t       spa_resilver_deferred;
        kmutex_t        spa_async_lock;         /* protect async state */
        kthread_t       *spa_async_thread;      /* thread doing async task */
        int             spa_async_suspended;    /* async tasks suspended */
@@ -384,12 +394,12 @@ struct spa {
 
        /*
         * spa_refcount & spa_config_lock must be the last elements
-        * because refcount_t changes size based on compilation options.
+        * because zfs_refcount_t changes size based on compilation options.
         * In order for the MDB module to function correctly, the other
         * fields must remain in the same location.
         */
        spa_config_lock_t spa_config_lock[SCL_LOCKS]; /* config changes */
-       refcount_t      spa_refcount;           /* number of opens */
+       zfs_refcount_t  spa_refcount;           /* number of opens */
 
        taskq_t         *spa_upgrade_taskq;     /* taskq for upgrade jobs */
 };