]> git.proxmox.com Git - mirror_zfs.git/commit - tests/runfiles/common.run
Add 'zfs wait' command
authorPaul Dagnelie <pcd@delphix.com>
Wed, 1 Apr 2020 17:02:06 +0000 (10:02 -0700)
committerGitHub <noreply@github.com>
Wed, 1 Apr 2020 17:02:06 +0000 (10:02 -0700)
commit5a42ef04fd390dc96fbbf31bc9f3d05695998211
treeee4aec968084618faa92988b08a3c41c9b904327
parentc9e3efdb3a6111b9795becc6594b3c52ba004522
Add 'zfs wait' command

Add a mechanism to wait for delete queue to drain.

When doing redacted send/recv, many workflows involve deleting files
that contain sensitive data. Because of the way zfs handles file
deletions, snapshots taken quickly after a rm operation can sometimes
still contain the file in question, especially if the file is very
large. This can result in issues for redacted send/recv users who
expect the deleted files to be redacted in the send streams, and not
appear in their clones.

This change duplicates much of the zpool wait related logic into a
zfs wait command, which can be used to wait until the internal
deleteq has been drained.  Additional wait activities may be added
in the future.

Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Gallagher <john.gallagher@delphix.com>
Signed-off-by: Paul Dagnelie <pcd@delphix.com>
Closes #9707
25 files changed:
cmd/zfs/zfs_main.c
configure.ac
include/libzfs.h
include/libzfs_core.h
include/sys/dsl_dir.h
include/sys/fs/zfs.h
lib/libzfs/libzfs_dataset.c
lib/libzfs_core/libzfs_core.c
man/man8/Makefile.am
man/man8/zfs-wait.8 [new file with mode: 0644]
man/man8/zfs.8
module/os/linux/zfs/zfs_dir.c
module/os/linux/zfs/zfs_vfsops.c
module/zfs/dsl_dataset.c
module/zfs/dsl_destroy.c
module/zfs/dsl_dir.c
module/zfs/zfs_ioctl.c
tests/runfiles/common.run
tests/zfs-tests/cmd/libzfs_input_check/libzfs_input_check.c
tests/zfs-tests/tests/functional/cli_root/Makefile.am
tests/zfs-tests/tests/functional/cli_root/zfs_wait/Makefile.am [new file with mode: 0644]
tests/zfs-tests/tests/functional/cli_root/zfs_wait/cleanup.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_wait/setup.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_wait/zfs_wait.kshlib [new file with mode: 0644]
tests/zfs-tests/tests/functional/cli_root/zfs_wait/zfs_wait_deleteq.ksh [new file with mode: 0755]