]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Fix hierarchy misspellings
authorRichard Laager <rlaager@wiktel.com>
Mon, 15 Apr 2019 02:06:34 +0000 (21:06 -0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 15 Apr 2019 02:06:34 +0000 (19:06 -0700)
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reported-by: Matthew Ahrens <mahrens@delphix.com>
Signed-off-by: Richard Laager <rlaager@wiktel.com>
Closes #8563
Closes #8622

lib/libzfs/libzfs_sendrecv.c
tests/runfiles/linux.run
tests/zfs-tests/tests/functional/cli_root/zfs_destroy/zfs_destroy_003_pos.ksh
tests/zfs-tests/tests/functional/rsend/Makefile.am
tests/zfs-tests/tests/functional/rsend/send_encrypted_heirarchy.ksh [deleted file]
tests/zfs-tests/tests/functional/rsend/send_encrypted_hierarchy.ksh [new file with mode: 0755]

index bcf0f43ce188f416819f247985b923d11c251632..d68efd96ebe367ac08467556759d8adc9be290e7 100644 (file)
@@ -2759,13 +2759,13 @@ created_before(libzfs_handle_t *hdl, avl_tree_t *avl,
 }
 
 /*
- * This function reestablishes the heirarchy of encryption roots after a
+ * This function reestablishes the hierarchy of encryption roots after a
  * recursive incremental receive has completed. This must be done after the
  * second call to recv_incremental_replication() has renamed and promoted all
- * sent datasets to their final locations in the dataset heriarchy.
+ * sent datasets to their final locations in the dataset hierarchy.
  */
 static int
-recv_fix_encryption_heirarchy(libzfs_handle_t *hdl, const char *destname,
+recv_fix_encryption_hierarchy(libzfs_handle_t *hdl, const char *destname,
     nvlist_t *stream_nv, avl_tree_t *stream_avl)
 {
        int err;
@@ -3406,7 +3406,7 @@ zfs_receive_package(libzfs_handle_t *hdl, int fd, const char *destname,
        }
 
        if (raw && softerr == 0) {
-               softerr = recv_fix_encryption_heirarchy(hdl, destname,
+               softerr = recv_fix_encryption_hierarchy(hdl, destname,
                    stream_nv, stream_avl);
        }
 
@@ -3815,7 +3815,7 @@ zfs_receive_one(libzfs_handle_t *hdl, int infd, const char *tosnap,
                /*
                 * The keylocation property may only be set on encryption roots,
                 * but this dataset might not become an encryption root until
-                * recv_fix_encryption_heirarchy() is called. That function
+                * recv_fix_encryption_hierarchy() is called. That function
                 * will fixup the keylocation anyway, so we temporarily unset
                 * the keylocation for now to avoid any errors from the receive
                 * ioctl.
index f57572dc21adedf0c20fbecc4706b263bb4dc0fa..f01a36da8bddb8893b965d3e0f8da290954e607d 100644 (file)
@@ -803,7 +803,7 @@ tests = ['rsend_001_pos', 'rsend_002_pos', 'rsend_003_pos', 'rsend_004_pos',
     'send-c_lz4_disabled', 'send-c_recv_lz4_disabled',
     'send-c_mixed_compression', 'send-c_stream_size_estimate', 'send-cD',
     'send-c_embedded_blocks', 'send-c_resume', 'send-cpL_varied_recsize',
-    'send-c_recv_dedup', 'send_encrypted_files', 'send_encrypted_heirarchy',
+    'send-c_recv_dedup', 'send_encrypted_files', 'send_encrypted_hierarchy',
     'send_encrypted_props', 'send_freeobjects', 'send_realloc_dnode_size',
     'send_realloc_files', 'send_holds', 'send_hole_birth', 'send_mixed_raw',
     'send-wDR_encrypted_zvol']
index 3c909e458e74962c2bf2c55532c859cd501f09b5..04e9713124b16b56734963cfce158a58e206dc54 100755 (executable)
@@ -135,7 +135,7 @@ for obj in $child_fs $child_fs1 $ctr $ctr1; do
        log_mustnot zfs destroy -r $obj
        datasetexists $obj || \
                log_fail "'zfs destroy -r' fails to keep dependent " \
-                       "clone outside the hirearchy."
+                       "clone outside the hierarchy."
 done
 
 
index 22cafd19fb01e5c9baf0bb9252359a7a8bf234c2..24d4d61cd4d4920acd4c76a6c2ab6d1a8c3ddf14 100644 (file)
@@ -22,7 +22,7 @@ dist_pkgdata_SCRIPTS = \
        rsend_022_pos.ksh \
        rsend_024_pos.ksh \
        send_encrypted_files.ksh \
-       send_encrypted_heirarchy.ksh \
+       send_encrypted_hierarchy.ksh \
        send_encrypted_props.ksh \
        send-cD.ksh \
        send-c_embedded_blocks.ksh \
diff --git a/tests/zfs-tests/tests/functional/rsend/send_encrypted_heirarchy.ksh b/tests/zfs-tests/tests/functional/rsend/send_encrypted_heirarchy.ksh
deleted file mode 100755 (executable)
index 5e19a6b..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-#!/bin/ksh -p
-#
-# CDDL HEADER START
-#
-# This file and its contents are supplied under the terms of the
-# Common Development and Distribution License ("CDDL"), version 1.0.
-# You may only use this file in accordance with the terms of version
-# 1.0 of the CDDL.
-#
-# A full copy of the text of the CDDL should have accompanied this
-# source.  A copy of the CDDL is also available via the Internet at
-# http://www.illumos.org/license/CDDL.
-#
-# CDDL HEADER END
-#
-
-#
-# Copyright (c) 2017 by Datto Inc. All rights reserved.
-#
-
-. $STF_SUITE/tests/functional/rsend/rsend.kshlib
-. $STF_SUITE/tests/functional/cli_root/zfs_load-key/zfs_load-key_common.kshlib
-
-#
-# DESCRIPTION:
-# Raw recursive sends preserve filesystem structure.
-#
-# STRATEGY:
-# 1. Create an encrypted filesystem with a clone and a child
-# 2. Snapshot and send the filesystem tree
-# 3. Verify that the filesystem structure was correctly received
-# 4. Change the child to an encryption root and promote the clone
-# 5. Snapshot and send the filesystem tree again
-# 6. Verify that the new structure is received correctly
-#
-
-verify_runnable "both"
-
-function cleanup
-{
-       log_must cleanup_pool $POOL
-       log_must cleanup_pool $POOL2
-       log_must setup_test_model $POOL
-}
-
-log_assert "Raw recursive sends preserve filesystem structure."
-log_onexit cleanup
-
-# Create the filesystem heirarchy
-log_must cleanup_pool $POOL
-log_must eval "echo $PASSPHRASE | zfs create -o encryption=on" \
-       "-o keyformat=passphrase $POOL/$FS"
-log_must zfs snapshot $POOL/$FS@snap
-log_must zfs clone $POOL/$FS@snap $POOL/clone
-log_must zfs create $POOL/$FS/child
-
-# Back up the tree and verify the structure
-log_must zfs snapshot -r $POOL@before
-log_must eval "zfs send -wR $POOL@before > $BACKDIR/fs-before-R"
-log_must eval "zfs receive -d -F $POOL2 < $BACKDIR/fs-before-R"
-dstds=$(get_dst_ds $POOL/$FS $POOL2)
-log_must cmp_ds_subs $POOL/$FS $dstds
-
-log_must verify_encryption_root $POOL/$FS $POOL/$FS
-log_must verify_keylocation $POOL/$FS "prompt"
-log_must verify_origin $POOL/$FS "-"
-
-log_must verify_encryption_root $POOL/clone $POOL/$FS
-log_must verify_keylocation $POOL/clone "none"
-log_must verify_origin $POOL/clone "$POOL/$FS@snap"
-
-log_must verify_encryption_root $POOL/$FS/child $POOL/$FS
-log_must verify_keylocation $POOL/$FS/child "none"
-
-# Alter the heirarchy and re-send
-log_must eval "echo $PASSPHRASE1 | zfs change-key -o keyformat=passphrase" \
-       "$POOL/$FS/child"
-log_must zfs promote $POOL/clone
-log_must zfs snapshot -r $POOL@after
-log_must eval "zfs send -wR -i $POOL@before $POOL@after >" \
-       "$BACKDIR/fs-after-R"
-log_must eval "zfs receive -d -F $POOL2 < $BACKDIR/fs-after-R"
-log_must cmp_ds_subs $POOL/$FS $dstds
-
-log_must verify_encryption_root $POOL/$FS $POOL/clone
-log_must verify_keylocation $POOL/$FS "none"
-log_must verify_origin $POOL/$FS "$POOL/clone@snap"
-
-log_must verify_encryption_root $POOL/clone $POOL/clone
-log_must verify_keylocation $POOL/clone "prompt"
-log_must verify_origin $POOL/clone "-"
-
-log_must verify_encryption_root $POOL/$FS/child $POOL/$FS/child
-log_must verify_keylocation $POOL/$FS/child "prompt"
-
-log_pass "Raw recursive sends preserve filesystem structure."
diff --git a/tests/zfs-tests/tests/functional/rsend/send_encrypted_hierarchy.ksh b/tests/zfs-tests/tests/functional/rsend/send_encrypted_hierarchy.ksh
new file mode 100755 (executable)
index 0000000..8417afc
--- /dev/null
@@ -0,0 +1,96 @@
+#!/bin/ksh -p
+#
+# CDDL HEADER START
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source.  A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2017 by Datto Inc. All rights reserved.
+#
+
+. $STF_SUITE/tests/functional/rsend/rsend.kshlib
+. $STF_SUITE/tests/functional/cli_root/zfs_load-key/zfs_load-key_common.kshlib
+
+#
+# DESCRIPTION:
+# Raw recursive sends preserve filesystem structure.
+#
+# STRATEGY:
+# 1. Create an encrypted filesystem with a clone and a child
+# 2. Snapshot and send the filesystem tree
+# 3. Verify that the filesystem structure was correctly received
+# 4. Change the child to an encryption root and promote the clone
+# 5. Snapshot and send the filesystem tree again
+# 6. Verify that the new structure is received correctly
+#
+
+verify_runnable "both"
+
+function cleanup
+{
+       log_must cleanup_pool $POOL
+       log_must cleanup_pool $POOL2
+       log_must setup_test_model $POOL
+}
+
+log_assert "Raw recursive sends preserve filesystem structure."
+log_onexit cleanup
+
+# Create the filesystem hierarchy
+log_must cleanup_pool $POOL
+log_must eval "echo $PASSPHRASE | zfs create -o encryption=on" \
+       "-o keyformat=passphrase $POOL/$FS"
+log_must zfs snapshot $POOL/$FS@snap
+log_must zfs clone $POOL/$FS@snap $POOL/clone
+log_must zfs create $POOL/$FS/child
+
+# Back up the tree and verify the structure
+log_must zfs snapshot -r $POOL@before
+log_must eval "zfs send -wR $POOL@before > $BACKDIR/fs-before-R"
+log_must eval "zfs receive -d -F $POOL2 < $BACKDIR/fs-before-R"
+dstds=$(get_dst_ds $POOL/$FS $POOL2)
+log_must cmp_ds_subs $POOL/$FS $dstds
+
+log_must verify_encryption_root $POOL/$FS $POOL/$FS
+log_must verify_keylocation $POOL/$FS "prompt"
+log_must verify_origin $POOL/$FS "-"
+
+log_must verify_encryption_root $POOL/clone $POOL/$FS
+log_must verify_keylocation $POOL/clone "none"
+log_must verify_origin $POOL/clone "$POOL/$FS@snap"
+
+log_must verify_encryption_root $POOL/$FS/child $POOL/$FS
+log_must verify_keylocation $POOL/$FS/child "none"
+
+# Alter the hierarchy and re-send
+log_must eval "echo $PASSPHRASE1 | zfs change-key -o keyformat=passphrase" \
+       "$POOL/$FS/child"
+log_must zfs promote $POOL/clone
+log_must zfs snapshot -r $POOL@after
+log_must eval "zfs send -wR -i $POOL@before $POOL@after >" \
+       "$BACKDIR/fs-after-R"
+log_must eval "zfs receive -d -F $POOL2 < $BACKDIR/fs-after-R"
+log_must cmp_ds_subs $POOL/$FS $dstds
+
+log_must verify_encryption_root $POOL/$FS $POOL/clone
+log_must verify_keylocation $POOL/$FS "none"
+log_must verify_origin $POOL/$FS "$POOL/clone@snap"
+
+log_must verify_encryption_root $POOL/clone $POOL/clone
+log_must verify_keylocation $POOL/clone "prompt"
+log_must verify_origin $POOL/clone "-"
+
+log_must verify_encryption_root $POOL/$FS/child $POOL/$FS/child
+log_must verify_keylocation $POOL/$FS/child "prompt"
+
+log_pass "Raw recursive sends preserve filesystem structure."