diff options
author | mm <mm@FreeBSD.org> | 2012-06-11 11:35:22 +0000 |
---|---|---|
committer | mm <mm@FreeBSD.org> | 2012-06-11 11:35:22 +0000 |
commit | cc61ab2f133566dca51970d44cc49a4355039b5d (patch) | |
tree | a0efb9ad759cc8c8f8ec6f2cbabe6b3305a334e9 /sys/cddl/boot | |
parent | 2cecdd81d885af2868172221b5068c523eade78c (diff) | |
download | FreeBSD-src-cc61ab2f133566dca51970d44cc49a4355039b5d.zip FreeBSD-src-cc61ab2f133566dca51970d44cc49a4355039b5d.tar.gz |
Introduce "feature flags" for ZFS pools (bump SPA version to 5000).
Add first feature "com.delphix:async_destroy" (asynchronous destroy
of ZFS datasets).
Implement features support in ZFS boot code.
Illumos revisions merged:
13700:2889e2596bd6
13701:1949b688d5fb
2619 asynchronous destruction of ZFS file systems
2747 SPA versioning with zfs feature flags
References:
https://www.illumos.org/issues/2619
https://www.illumos.org/issues/2747
Obtained from: illumos (issue #2619, #2747)
MFC after: 1 month
Diffstat (limited to 'sys/cddl/boot')
-rw-r--r-- | sys/cddl/boot/zfs/zfsimpl.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sys/cddl/boot/zfs/zfsimpl.h b/sys/cddl/boot/zfs/zfsimpl.h index 66379a3..af15796 100644 --- a/sys/cddl/boot/zfs/zfsimpl.h +++ b/sys/cddl/boot/zfs/zfsimpl.h @@ -53,6 +53,8 @@ * Use is subject to license terms. */ +#define MAXNAMELEN 256 + /* CRC64 table */ #define ZFS_CRC64_POLY 0xC96C5795D7870F42ULL /* ECMA-182, reflected form */ @@ -508,6 +510,7 @@ typedef enum { #define SPA_VERSION_26 26ULL #define SPA_VERSION_27 27ULL #define SPA_VERSION_28 28ULL +#define SPA_VERSION_5000 5000ULL /* * When bumping up SPA_VERSION, make sure GRUB ZFS understands the on-disk @@ -515,8 +518,8 @@ typedef enum { * and do the appropriate changes. Also bump the version number in * usr/src/grub/capability. */ -#define SPA_VERSION SPA_VERSION_28 -#define SPA_VERSION_STRING "28" +#define SPA_VERSION SPA_VERSION_5000 +#define SPA_VERSION_STRING "5000" /* * Symbolic names for the changes that caused a SPA_VERSION switch. @@ -567,6 +570,12 @@ typedef enum { #define SPA_VERSION_DEADLISTS SPA_VERSION_26 #define SPA_VERSION_FAST_SNAP SPA_VERSION_27 #define SPA_VERSION_MULTI_REPLACE SPA_VERSION_28 +#define SPA_VERSION_BEFORE_FEATURES SPA_VERSION_28 +#define SPA_VERSION_FEATURES SPA_VERSION_5000 + +#define SPA_VERSION_IS_SUPPORTED(v) \ + (((v) >= SPA_VERSION_INITIAL && (v) <= SPA_VERSION_BEFORE_FEATURES) || \ + ((v) >= SPA_VERSION_FEATURES && (v) <= SPA_VERSION)) /* * The following are configuration names used in the nvlist describing a pool's @@ -602,6 +611,7 @@ typedef enum { #define ZPOOL_CONFIG_HOSTNAME "hostname" #define ZPOOL_CONFIG_IS_LOG "is_log" #define ZPOOL_CONFIG_TIMESTAMP "timestamp" /* not stored on disk */ +#define ZPOOL_CONFIG_FEATURES_FOR_READ "features_for_read" /* * The persistent vdev state is stored as separate values rather than a single |