# SPDX-License-Identifier: CDDL-1.0
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or https://opensource.org/licenses/CDDL-1.0.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#

#
# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#

#
# Copyright (c) 2012 by Delphix. All rights reserved.
# Copyright 2015 Nexenta Systems, Inc.  All rights reserved.
#

# The following variable names describe files, stored as gzip compressed files
# in the test directory which can be used to construct a pool of a given
# version. The variable names are important, in that the construction
# ZPOOL_VERSION_$var_FILES describes the files the pool is made from, and
# ZPOOL_VERSION_$var_NAME describes the pool name.

# v1 pools
ZPOOL_VERSION_1_FILES="zfs-pool-v1.dat"
ZPOOL_VERSION_1_NAME="v1-pool"
# v1 stripe
ZPOOL_VERSION_1stripe_FILES="zfs-pool-v1stripe1.dat \
zfs-pool-v1stripe2.dat  zfs-pool-v1stripe3.dat"
ZPOOL_VERSION_1stripe_NAME="pool-v1stripe"
# v1 raidz
ZPOOL_VERSION_1raidz_FILES="zfs-pool-v1raidz1.dat zfs-pool-v1raidz2.dat \
zfs-pool-v1raidz3.dat"
ZPOOL_VERSION_1raidz_NAME="pool-v1raidz"
# v1 mirror
ZPOOL_VERSION_1mirror_FILES="zfs-pool-v1mirror1.dat zfs-pool-v1mirror2.dat \
zfs-pool-v1mirror3.dat"
ZPOOL_VERSION_1mirror_NAME="pool-v1mirror"

# v2 pools
ZPOOL_VERSION_2_FILES="zfs-pool-v2.dat"
ZPOOL_VERSION_2_NAME="v2-pool"
# v2 stripe
ZPOOL_VERSION_2stripe_FILES="zfs-pool-v2stripe1.dat zfs-pool-v2stripe2.dat \
zfs-pool-v2stripe3.dat"
ZPOOL_VERSION_2stripe_NAME="pool-v2stripe"
# v2 raidz
ZPOOL_VERSION_2raidz_FILES="zfs-pool-v2raidz1.dat zfs-pool-v2raidz2.dat \
zfs-pool-v2raidz3.dat"
ZPOOL_VERSION_2raidz_NAME="pool-v2raidz"
# v2 mirror
ZPOOL_VERSION_2mirror_FILES="zfs-pool-v2mirror1.dat zfs-pool-v2mirror2.dat \
zfs-pool-v2mirror3.dat"
ZPOOL_VERSION_2mirror_NAME="pool-v2mirror"

# v3 pools
ZPOOL_VERSION_3_FILES="zfs-pool-v3.dat"
ZPOOL_VERSION_3_NAME="v3-pool"
# v3 stripe
ZPOOL_VERSION_3stripe_FILES="zfs-pool-v3stripe1.dat zfs-pool-v3stripe2.dat \
zfs-pool-v3stripe3.dat"
ZPOOL_VERSION_3stripe_NAME="pool-v3stripe"
# v3 raidz
ZPOOL_VERSION_3raidz_FILES="zfs-pool-v3raidz1.dat zfs-pool-v3raidz2.dat \
zfs-pool-v3raidz3.dat"
ZPOOL_VERSION_3raidz_NAME="pool-v3raidz"
# v3 mirror
ZPOOL_VERSION_3mirror_FILES="zfs-pool-v3mirror1.dat zfs-pool-v3mirror2.dat \
zfs-pool-v3mirror3.dat"
ZPOOL_VERSION_3mirror_NAME="pool-v3mirror"
# v3 raidz2
ZPOOL_VERSION_3dblraidz_FILES="zfs-pool-v3raidz21.dat zfs-pool-v3raidz22.dat \
zfs-pool-v3raidz23.dat"
ZPOOL_VERSION_3dblraidz_NAME="pool-v3raidz2"
# v3 hotspares
ZPOOL_VERSION_3hotspare_FILES="zfs-pool-v3hotspare1.dat \
zfs-pool-v3hotspare2.dat zfs-pool-v3hotspare3.dat"
ZPOOL_VERSION_3hotspare_NAME="pool-v3hotspare"

# v4 pool
ZPOOL_VERSION_4_FILES="zfs-pool-v4.dat"
ZPOOL_VERSION_4_NAME="v4-pool"

# v5 pool
ZPOOL_VERSION_5_FILES="zfs-pool-v5.dat"
ZPOOL_VERSION_5_NAME="v5-pool"

# v6 pool
ZPOOL_VERSION_6_FILES="zfs-pool-v6.dat"
ZPOOL_VERSION_6_NAME="v6-pool"

# v7 pool
ZPOOL_VERSION_7_FILES="zfs-pool-v7.dat"
ZPOOL_VERSION_7_NAME="v7-pool"

# v8 pool
ZPOOL_VERSION_8_FILES="zfs-pool-v8.dat"
ZPOOL_VERSION_8_NAME="v8-pool"

# v9 pool
ZPOOL_VERSION_9_FILES="zfs-pool-v9.dat"
ZPOOL_VERSION_9_NAME="v9-pool"

# v10 pool
ZPOOL_VERSION_10_FILES="zfs-pool-v10.dat"
ZPOOL_VERSION_10_NAME="v10-pool"

# v11 pool
ZPOOL_VERSION_11_FILES="zfs-pool-v11.dat"
ZPOOL_VERSION_11_NAME="v11-pool"

# v12 pool
ZPOOL_VERSION_12_FILES="zfs-pool-v12.dat"
ZPOOL_VERSION_12_NAME="v12-pool"

# v13 pool
ZPOOL_VERSION_13_FILES="zfs-pool-v13.dat"
ZPOOL_VERSION_13_NAME="v13-pool"

# v14 pool
ZPOOL_VERSION_14_FILES="zfs-pool-v14.dat"
ZPOOL_VERSION_14_NAME="v14-pool"

# v15 pool
ZPOOL_VERSION_15_FILES="zfs-pool-v15.dat"
ZPOOL_VERSION_15_NAME="v15-pool"

# v2 pool, with device problems on one side of the mirror
# so that the pool appears as DEGRADED
ZPOOL_VERSION_2brokenmirror_FILES="zfs-broken-mirror1.dat \
zfs-broken-mirror2.dat"
ZPOOL_VERSION_2brokenmirror_NAME="zfs-broken-mirror"

# v999 pool (an unknown version) which can be used to check whether upgrade,
# import or other tests that should fail against unknown pool version.
# It should not be listed in the CONFIGS variable below, as these are pool
# versions that can be imported and upgraded.
ZPOOL_VERSION_9999_FILES="zfs-pool-v999.dat"
ZPOOL_VERSION_9999_NAME="v999-pool"

# This is a list of pool configurations we should be able to upgrade from,
# each entry should have corresponding ZPOOL_VERSION_*_FILES and
# ZPOOL_VERSION_*_NAME variables defined above.
CONFIGS="1 1stripe 1raidz 1mirror \
2 2stripe 2raidz 2mirror 2brokenmirror \
3 3stripe 3raidz 3mirror 3dblraidz 3hotspare \
4 5 6 7 8 9 10 11 12 13 14 15"
