5 # The contents of this file are subject to the terms of the
6 # Common Development and Distribution License (the "License").
7 # You may not use this file except in compliance with the License.
9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 # or http://www.opensolaris.org/os/licensing.
11 # See the License for the specific language governing permissions
12 # and limitations under the License.
14 # When distributing Covered Code, include this CDDL HEADER in each
15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 # If applicable, add the following below this CDDL HEADER, with the
17 # fields enclosed by brackets "[]" replaced with your own identifying
18 # information: Portions Copyright [yyyy] [name of copyright owner]
24 # Copyright (c) 2016 by Lawrence Livermore National Security, LLC.
25 # Use is subject to license terms.
28 . $STF_SUITE/include/libtest.shlib
30 verify_runnable "both"
34 if datasetexists $LDNPOOL ; then
35 log_must zpool destroy -f $LDNPOOL
41 log_assert "feature correctly switches between enabled and active"
44 LDNFS=$LDNPOOL/large_dnode
45 log_must mkfile 64M $TESTDIR/$LDNPOOL
46 log_must zpool create $LDNPOOL $TESTDIR/$LDNPOOL
49 state=$(zpool list -Ho feature@large_dnode $LDNPOOL)
50 if [[ "$state" != "enabled" ]]; then
51 log_fail "large_dnode has state $state (expected enabled)"
54 log_must zfs create -o dnodesize=1k $LDNFS
55 log_must touch /$LDNFS/foo
56 log_must zfs unmount $LDNFS
58 state=$(zpool list -Ho feature@large_dnode $LDNPOOL)
59 if [[ "$state" != "active" ]]; then
60 log_fail "large_dnode has state $state (expected active)"
63 log_must zfs destroy $LDNFS
65 state=$(zpool list -Ho feature@large_dnode $LDNPOOL)
66 if [[ "$state" != "enabled" ]]; then
67 log_fail "large_dnode has state $state (expected enabled)"