Print this page
NEX-5795 Rename 'wrc' as 'wbc' in the source and in the tech docs
Reviewed by: Alex Aizman <alex.aizman@nexenta.com>
Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
Reviewed by: Alek Pinchuk <alek.pinchuk@nexenta.com>
NEX-5265 zpool_prop and zfeature_common need a comment to update the test suites when a new feature or prop is added
Reviewed by: Alek Pinchuk <alek.pinchuk@nexenta.com>
6328 Fix cstyle errors in zfs codebase (fix studio)
6328 Fix cstyle errors in zfs codebase
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Alex Reece <alex@delphix.com>
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Reviewed by: Jorgen Lundman <lundman@lundman.net>
Approved by: Robert Mustacchi <rm@joyent.com>
4185 add new cryptographic checksums to ZFS: SHA-512, Skein, Edon-R (fix studio build)
4185 add new cryptographic checksums to ZFS: SHA-512, Skein, Edon-R
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Saso Kiselkov <saso.kiselkov@nexenta.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Approved by: Garrett D'Amore <garrett@damore.org>
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-4476 WRC: Allow to use write back cache per tree of datasets
Reviewed by: Alek Pinchuk <alek.pinchuk@nexenta.com>
Reviewed by: Alex Aizman <alex.aizman@nexenta.com>
Revert "NEX-4476 WRC: Allow to use write back cache per tree of datasets"
This reverts commit fe97b74444278a6f36fec93179133641296312da.
NEX-4476 WRC: Allow to use write back cache per tree of datasets
Reviewed by: Alek Pinchuk <alek.pinchuk@nexenta.com>
Reviewed by: Alex Aizman <alex.aizman@nexenta.com>
NEX-4044 remove sha1crc32 in preparation with upstream merge of edon-r and skien
Reviewed by: Saso Kiselkov <saso.kiselkov@nexenta.com>
Reviewed by: Alek Pinchuk <alek@nexenta.com>
Conflicts:
        usr/src/uts/common/fs/zfs/sys/zio_checksum.h
Revert "SUP-817 Removed references to special device"
This reverts commit f8970e28f0d8bd6b69711722f341e3e1d0e1babf.
SUP-817 Removed references to special device
4370 avoid transmitting holes during zfs send
4371 DMU code clean up
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Approved by: Garrett D'Amore <garrett@damore.org>
OS-80 support for vdev and CoS properties for the new I/O scheduler
OS-95 lint warning introduced by OS-61
Issue #34: Add feature flag for the compount checksum - sha1crc32
           Contributors: Boris Protopopov
Issue #9: Support for persistent CoS/vdev attributes with feature flags
          Support for feature flags for special tier
          Contributors: Daniil Lunev, Boris Protopopov


   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright (c) 2011, 2015 by Delphix. All rights reserved.
  24  * Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
  25  * Copyright (c) 2013, Joyent, Inc. All rights reserved.
  26  * Copyright (c) 2014, Nexenta Systems, Inc. All rights reserved.
  27  * Copyright (c) 2014 Integros [integros.com]

  28  */
  29 
  30 #ifdef _KERNEL
  31 #include <sys/systm.h>
  32 #else
  33 #include <errno.h>
  34 #include <string.h>
  35 #endif
  36 #include <sys/debug.h>
  37 #include <sys/fs/zfs.h>
  38 #include <sys/inttypes.h>
  39 #include <sys/types.h>
  40 #include "zfeature_common.h"
  41 
  42 /*
  43  * Set to disable all feature checks while opening pools, allowing pools with
  44  * unsupported features to be opened. Set for testing only.
  45  */
  46 boolean_t zfeature_checks_disable = B_FALSE;
  47 


 151         ASSERT(desc != NULL);
 152         ASSERT((flags & ZFEATURE_FLAG_READONLY_COMPAT) == 0 ||
 153             (flags & ZFEATURE_FLAG_MOS) == 0);
 154         ASSERT3U(fid, <, SPA_FEATURES);
 155         ASSERT(zfeature_is_valid_guid(guid));
 156 
 157         if (deps == NULL)
 158                 deps = nodeps;
 159 
 160         VERIFY(((flags & ZFEATURE_FLAG_PER_DATASET) == 0) ||
 161             (deps_contains_feature(deps, SPA_FEATURE_EXTENSIBLE_DATASET)));
 162 
 163         feature->fi_feature = fid;
 164         feature->fi_guid = guid;
 165         feature->fi_uname = name;
 166         feature->fi_desc = desc;
 167         feature->fi_flags = flags;
 168         feature->fi_depends = deps;
 169 }
 170 


 171 void
 172 zpool_feature_init(void)
 173 {






 174         zfeature_register(SPA_FEATURE_ASYNC_DESTROY,
 175             "com.delphix:async_destroy", "async_destroy",
 176             "Destroy filesystems asynchronously.",
 177             ZFEATURE_FLAG_READONLY_COMPAT, NULL);
 178 
 179         zfeature_register(SPA_FEATURE_EMPTY_BPOBJ,
 180             "com.delphix:empty_bpobj", "empty_bpobj",
 181             "Snapshots use less space.",
 182             ZFEATURE_FLAG_READONLY_COMPAT, NULL);
 183 
 184         zfeature_register(SPA_FEATURE_LZ4_COMPRESS,
 185             "org.illumos:lz4_compress", "lz4_compress",
 186             "LZ4 compression algorithm support.",
 187             ZFEATURE_FLAG_ACTIVATE_ON_ENABLE, NULL);
 188 
 189         zfeature_register(SPA_FEATURE_MULTI_VDEV_CRASH_DUMP,
 190             "com.joyent:multi_vdev_crash_dump", "multi_vdev_crash_dump",
 191             "Crash dumps to multiple vdev pools.",
 192             0, NULL);
 193 


 259             ZFEATURE_FLAG_PER_DATASET, sha512_deps);
 260 
 261         static const spa_feature_t skein_deps[] = {
 262                 SPA_FEATURE_EXTENSIBLE_DATASET,
 263                 SPA_FEATURE_NONE
 264         };
 265         zfeature_register(SPA_FEATURE_SKEIN,
 266             "org.illumos:skein", "skein",
 267             "Skein hash algorithm.",
 268             ZFEATURE_FLAG_PER_DATASET, skein_deps);
 269 
 270         static const spa_feature_t edonr_deps[] = {
 271                 SPA_FEATURE_EXTENSIBLE_DATASET,
 272                 SPA_FEATURE_NONE
 273         };
 274         zfeature_register(SPA_FEATURE_EDONR,
 275             "org.illumos:edonr", "edonr",
 276             "Edon-R hash algorithm.",
 277             ZFEATURE_FLAG_PER_DATASET, edonr_deps);
 278 
 279         zfeature_register(SPA_FEATURE_DEVICE_REMOVAL,
 280             "com.delphix:device_removal", "device_removal",
 281             "Top-level vdevs can be removed, reducing logical pool size.",
 282             ZFEATURE_FLAG_MOS, NULL);
 283 
 284         static const spa_feature_t obsolete_counts_deps[] = {
 285                 SPA_FEATURE_EXTENSIBLE_DATASET,
 286                 SPA_FEATURE_DEVICE_REMOVAL,
 287                 SPA_FEATURE_NONE
 288         };
 289         zfeature_register(SPA_FEATURE_OBSOLETE_COUNTS,
 290             "com.delphix:obsolete_counts", "obsolete_counts",
 291             "Reduce memory used by removed devices when their blocks are "
 292             "freed or remapped.",
 293             ZFEATURE_FLAG_READONLY_COMPAT, obsolete_counts_deps);
 294 }


   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright (c) 2011, 2015 by Delphix. All rights reserved.
  24  * Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
  25  * Copyright (c) 2013, Joyent, Inc. All rights reserved.

  26  * Copyright (c) 2014 Integros [integros.com]
  27  * Copyright 2016 Nexenta Systems, Inc. All rights reserved.
  28  */
  29 
  30 #ifdef _KERNEL
  31 #include <sys/systm.h>
  32 #else
  33 #include <errno.h>
  34 #include <string.h>
  35 #endif
  36 #include <sys/debug.h>
  37 #include <sys/fs/zfs.h>
  38 #include <sys/inttypes.h>
  39 #include <sys/types.h>
  40 #include "zfeature_common.h"
  41 
  42 /*
  43  * Set to disable all feature checks while opening pools, allowing pools with
  44  * unsupported features to be opened. Set for testing only.
  45  */
  46 boolean_t zfeature_checks_disable = B_FALSE;
  47 


 151         ASSERT(desc != NULL);
 152         ASSERT((flags & ZFEATURE_FLAG_READONLY_COMPAT) == 0 ||
 153             (flags & ZFEATURE_FLAG_MOS) == 0);
 154         ASSERT3U(fid, <, SPA_FEATURES);
 155         ASSERT(zfeature_is_valid_guid(guid));
 156 
 157         if (deps == NULL)
 158                 deps = nodeps;
 159 
 160         VERIFY(((flags & ZFEATURE_FLAG_PER_DATASET) == 0) ||
 161             (deps_contains_feature(deps, SPA_FEATURE_EXTENSIBLE_DATASET)));
 162 
 163         feature->fi_feature = fid;
 164         feature->fi_guid = guid;
 165         feature->fi_uname = name;
 166         feature->fi_desc = desc;
 167         feature->fi_flags = flags;
 168         feature->fi_depends = deps;
 169 }
 170 
 171 spa_feature_t cos_deps[] = { SPA_FEATURE_VDEV_PROPS, SPA_FEATURE_NONE };
 172 
 173 void
 174 zpool_feature_init(void)
 175 {
 176 
 177         /*
 178          * NOTE: When either adding or changing a feature make sure
 179          * to update the zfs-tests zpool_get configuration file
 180          * at usr/src/test/zfs-tests/tests/functional/cli_root/zpool_get/zpool_get.cfg
 181          */
 182         zfeature_register(SPA_FEATURE_ASYNC_DESTROY,
 183             "com.delphix:async_destroy", "async_destroy",
 184             "Destroy filesystems asynchronously.",
 185             ZFEATURE_FLAG_READONLY_COMPAT, NULL);
 186 
 187         zfeature_register(SPA_FEATURE_EMPTY_BPOBJ,
 188             "com.delphix:empty_bpobj", "empty_bpobj",
 189             "Snapshots use less space.",
 190             ZFEATURE_FLAG_READONLY_COMPAT, NULL);
 191 
 192         zfeature_register(SPA_FEATURE_LZ4_COMPRESS,
 193             "org.illumos:lz4_compress", "lz4_compress",
 194             "LZ4 compression algorithm support.",
 195             ZFEATURE_FLAG_ACTIVATE_ON_ENABLE, NULL);
 196 
 197         zfeature_register(SPA_FEATURE_MULTI_VDEV_CRASH_DUMP,
 198             "com.joyent:multi_vdev_crash_dump", "multi_vdev_crash_dump",
 199             "Crash dumps to multiple vdev pools.",
 200             0, NULL);
 201 


 267             ZFEATURE_FLAG_PER_DATASET, sha512_deps);
 268 
 269         static const spa_feature_t skein_deps[] = {
 270                 SPA_FEATURE_EXTENSIBLE_DATASET,
 271                 SPA_FEATURE_NONE
 272         };
 273         zfeature_register(SPA_FEATURE_SKEIN,
 274             "org.illumos:skein", "skein",
 275             "Skein hash algorithm.",
 276             ZFEATURE_FLAG_PER_DATASET, skein_deps);
 277 
 278         static const spa_feature_t edonr_deps[] = {
 279                 SPA_FEATURE_EXTENSIBLE_DATASET,
 280                 SPA_FEATURE_NONE
 281         };
 282         zfeature_register(SPA_FEATURE_EDONR,
 283             "org.illumos:edonr", "edonr",
 284             "Edon-R hash algorithm.",
 285             ZFEATURE_FLAG_PER_DATASET, edonr_deps);
 286 
 287         zfeature_register(SPA_FEATURE_META_DEVICES,
 288             "com.nexenta:meta_devices", "meta_devices",
 289             "Dedicated devices for metadata.", ZFEATURE_FLAG_READONLY_COMPAT, NULL);
 290         zfeature_register(SPA_FEATURE_VDEV_PROPS,
 291             "com.nexenta:vdev_properties", "vdev_properties",
 292             "Vdev-specific properties.", ZFEATURE_FLAG_READONLY_COMPAT, NULL);
 293         zfeature_register(SPA_FEATURE_COS_PROPS,
 294             "com.nexenta:class_of_storage", "class_of_storage",
 295             "Properties for groups of vdevs.", ZFEATURE_FLAG_READONLY_COMPAT,
 296             cos_deps);
 297         zfeature_register(SPA_FEATURE_WBC,
 298             "com.nexenta:wbc", "wbc",
 299             "Write back cache support", 0, NULL);


 300 }