]>
git.proxmox.com Git - mirror_zfs.git/blob - tests/zfs-tests/tests/functional/features/large_dnode/large_dnode_005_pos.ksh
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]
23 .
$STF_SUITE/include
/libtest.shlib
25 verify_runnable
"both"
27 TEST_SEND_FS
=$TESTPOOL/send_large_dnode
28 TEST_RECV_FS
=$TESTPOOL/recv_large_dnode
29 TEST_SNAP
=$TEST_SEND_FS@ldnsnap
30 TEST_STREAM
=$TESTDIR/ldnsnap
36 if datasetexists
$TEST_SEND_FS ; then
37 log_must
$ZFS destroy
-r $TEST_SEND_FS
40 if datasetexists
$TEST_RECV_FS ; then
41 log_must
$ZFS destroy
-r $TEST_RECV_FS
49 log_assert
"zfs send stream with large dnodes accepted by new pool"
51 log_must
$ZFS create
-o dnodesize
=1k
$TEST_SEND_FS
52 log_must
touch /$TEST_SEND_FS/$TEST_FILE
53 log_must
$ZFS umount
$TEST_SEND_FS
54 log_must
$ZFS snap
$TEST_SNAP
55 log_must
$ZFS send
$TEST_SNAP > $TEST_STREAM
57 log_must
eval "$ZFS recv $TEST_RECV_FS < $TEST_STREAM"
58 inode
=$
(ls -li /$TEST_RECV_FS/$TEST_FILE |
awk '{print $1}')
59 dnsize
=$
($ZDB -dddd $TEST_RECV_FS $inode |
awk '/ZFS plain file/ {print $6}')
60 if [[ "$dnsize" != "1K" ]]; then
61 log_fail
"dnode size is $dnsize (expected 1K)"