zfsimpl.h (235343) | zfsimpl.h (236884) |
---|---|
1/*- 2 * Copyright (c) 2002 McAfee, Inc. 3 * All rights reserved. 4 * 5 * This software was developed for the FreeBSD Project by Marshall 6 * Kirk McKusick and McAfee Research,, the Security Research Division of 7 * McAfee, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as 8 * part of the DARPA CHATS research program --- 39 unchanged lines hidden (view full) --- 48 * 49 * CDDL HEADER END 50 */ 51/* 52 * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 53 * Use is subject to license terms. 54 */ 55 | 1/*- 2 * Copyright (c) 2002 McAfee, Inc. 3 * All rights reserved. 4 * 5 * This software was developed for the FreeBSD Project by Marshall 6 * Kirk McKusick and McAfee Research,, the Security Research Division of 7 * McAfee, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as 8 * part of the DARPA CHATS research program --- 39 unchanged lines hidden (view full) --- 48 * 49 * CDDL HEADER END 50 */ 51/* 52 * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 53 * Use is subject to license terms. 54 */ 55 |
56#define MAXNAMELEN 256 57 |
|
56/* CRC64 table */ 57#define ZFS_CRC64_POLY 0xC96C5795D7870F42ULL /* ECMA-182, reflected form */ 58 59/* 60 * Macros for various sorts of alignment and rounding when the alignment 61 * is known to be a power of 2. 62 */ 63#define P2ALIGN(x, align) ((x) & -(align)) --- 439 unchanged lines hidden (view full) --- 503#define SPA_VERSION_21 21ULL 504#define SPA_VERSION_22 22ULL 505#define SPA_VERSION_23 23ULL 506#define SPA_VERSION_24 24ULL 507#define SPA_VERSION_25 25ULL 508#define SPA_VERSION_26 26ULL 509#define SPA_VERSION_27 27ULL 510#define SPA_VERSION_28 28ULL | 58/* CRC64 table */ 59#define ZFS_CRC64_POLY 0xC96C5795D7870F42ULL /* ECMA-182, reflected form */ 60 61/* 62 * Macros for various sorts of alignment and rounding when the alignment 63 * is known to be a power of 2. 64 */ 65#define P2ALIGN(x, align) ((x) & -(align)) --- 439 unchanged lines hidden (view full) --- 505#define SPA_VERSION_21 21ULL 506#define SPA_VERSION_22 22ULL 507#define SPA_VERSION_23 23ULL 508#define SPA_VERSION_24 24ULL 509#define SPA_VERSION_25 25ULL 510#define SPA_VERSION_26 26ULL 511#define SPA_VERSION_27 27ULL 512#define SPA_VERSION_28 28ULL |
513#define SPA_VERSION_5000 5000ULL |
|
511 512/* 513 * When bumping up SPA_VERSION, make sure GRUB ZFS understands the on-disk 514 * format change. Go to usr/src/grub/grub-0.97/stage2/{zfs-include/, fsys_zfs*}, 515 * and do the appropriate changes. Also bump the version number in 516 * usr/src/grub/capability. 517 */ | 514 515/* 516 * When bumping up SPA_VERSION, make sure GRUB ZFS understands the on-disk 517 * format change. Go to usr/src/grub/grub-0.97/stage2/{zfs-include/, fsys_zfs*}, 518 * and do the appropriate changes. Also bump the version number in 519 * usr/src/grub/capability. 520 */ |
518#define SPA_VERSION SPA_VERSION_28 519#define SPA_VERSION_STRING "28" | 521#define SPA_VERSION SPA_VERSION_5000 522#define SPA_VERSION_STRING "5000" |
520 521/* 522 * Symbolic names for the changes that caused a SPA_VERSION switch. 523 * Used in the code when checking for presence or absence of a feature. 524 * Feel free to define multiple symbolic names for each version if there 525 * were multiple changes to on-disk structures during that version. 526 * 527 * NOTE: When checking the current SPA_VERSION in your code, be sure --- 34 unchanged lines hidden (view full) --- 562#define SPA_VERSION_RECVD_PROPS SPA_VERSION_22 563#define SPA_VERSION_SLIM_ZIL SPA_VERSION_23 564#define SPA_VERSION_SA SPA_VERSION_24 565#define SPA_VERSION_SCAN SPA_VERSION_25 566#define SPA_VERSION_DIR_CLONES SPA_VERSION_26 567#define SPA_VERSION_DEADLISTS SPA_VERSION_26 568#define SPA_VERSION_FAST_SNAP SPA_VERSION_27 569#define SPA_VERSION_MULTI_REPLACE SPA_VERSION_28 | 523 524/* 525 * Symbolic names for the changes that caused a SPA_VERSION switch. 526 * Used in the code when checking for presence or absence of a feature. 527 * Feel free to define multiple symbolic names for each version if there 528 * were multiple changes to on-disk structures during that version. 529 * 530 * NOTE: When checking the current SPA_VERSION in your code, be sure --- 34 unchanged lines hidden (view full) --- 565#define SPA_VERSION_RECVD_PROPS SPA_VERSION_22 566#define SPA_VERSION_SLIM_ZIL SPA_VERSION_23 567#define SPA_VERSION_SA SPA_VERSION_24 568#define SPA_VERSION_SCAN SPA_VERSION_25 569#define SPA_VERSION_DIR_CLONES SPA_VERSION_26 570#define SPA_VERSION_DEADLISTS SPA_VERSION_26 571#define SPA_VERSION_FAST_SNAP SPA_VERSION_27 572#define SPA_VERSION_MULTI_REPLACE SPA_VERSION_28 |
573#define SPA_VERSION_BEFORE_FEATURES SPA_VERSION_28 574#define SPA_VERSION_FEATURES SPA_VERSION_5000 |
|
570 | 575 |
576#define SPA_VERSION_IS_SUPPORTED(v) \ 577 (((v) >= SPA_VERSION_INITIAL && (v) <= SPA_VERSION_BEFORE_FEATURES) || \ 578 ((v) >= SPA_VERSION_FEATURES && (v) <= SPA_VERSION)) 579 |
|
571/* 572 * The following are configuration names used in the nvlist describing a pool's 573 * configuration. 574 */ 575#define ZPOOL_CONFIG_VERSION "version" 576#define ZPOOL_CONFIG_POOL_NAME "name" 577#define ZPOOL_CONFIG_POOL_STATE "state" 578#define ZPOOL_CONFIG_POOL_TXG "txg" --- 18 unchanged lines hidden (view full) --- 597#define ZPOOL_CONFIG_NOT_PRESENT "not_present" 598#define ZPOOL_CONFIG_SPARES "spares" 599#define ZPOOL_CONFIG_IS_SPARE "is_spare" 600#define ZPOOL_CONFIG_NPARITY "nparity" 601#define ZPOOL_CONFIG_HOSTID "hostid" 602#define ZPOOL_CONFIG_HOSTNAME "hostname" 603#define ZPOOL_CONFIG_IS_LOG "is_log" 604#define ZPOOL_CONFIG_TIMESTAMP "timestamp" /* not stored on disk */ | 580/* 581 * The following are configuration names used in the nvlist describing a pool's 582 * configuration. 583 */ 584#define ZPOOL_CONFIG_VERSION "version" 585#define ZPOOL_CONFIG_POOL_NAME "name" 586#define ZPOOL_CONFIG_POOL_STATE "state" 587#define ZPOOL_CONFIG_POOL_TXG "txg" --- 18 unchanged lines hidden (view full) --- 606#define ZPOOL_CONFIG_NOT_PRESENT "not_present" 607#define ZPOOL_CONFIG_SPARES "spares" 608#define ZPOOL_CONFIG_IS_SPARE "is_spare" 609#define ZPOOL_CONFIG_NPARITY "nparity" 610#define ZPOOL_CONFIG_HOSTID "hostid" 611#define ZPOOL_CONFIG_HOSTNAME "hostname" 612#define ZPOOL_CONFIG_IS_LOG "is_log" 613#define ZPOOL_CONFIG_TIMESTAMP "timestamp" /* not stored on disk */ |
614#define ZPOOL_CONFIG_FEATURES_FOR_READ "features_for_read" |
|
605 606/* 607 * The persistent vdev state is stored as separate values rather than a single 608 * 'vdev_state' entry. This is because a device can be in multiple states, such 609 * as offline and degraded. 610 */ 611#define ZPOOL_CONFIG_OFFLINE "offline" 612#define ZPOOL_CONFIG_FAULTED "faulted" --- 719 unchanged lines hidden --- | 615 616/* 617 * The persistent vdev state is stored as separate values rather than a single 618 * 'vdev_state' entry. This is because a device can be in multiple states, such 619 * as offline and degraded. 620 */ 621#define ZPOOL_CONFIG_OFFLINE "offline" 622#define ZPOOL_CONFIG_FAULTED "faulted" --- 719 unchanged lines hidden --- |