Implemented zpool sync command
commitbec1067d54a004cb52a4a6762bfa1d4a30300865
authorAlek P <alek-p@users.noreply.github.com>
Fri, 19 May 2017 19:33:11 +0000 (19 12:33 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 19 May 2017 19:33:11 +0000 (19 12:33 -0700)
treea464efb9e42d172cabbe66e7c2fb5296c5e6023d
parent4a283c7f77eb5065e9f03b122bf8ead4f4a1e2be
Implemented zpool sync command

This addition will enable us to sync an open TXG to the main pool
on demand. The functionality is similar to 'sync(2)' but 'zpool sync'
will return when data has hit the main storage instead of potentially
just the ZIL as is the case with the 'sync(2)' cmd.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Signed-off-by: Alek Pinchuk <apinchuk@datto.com>
Closes #6122
20 files changed:
cmd/zpool/zpool_main.c
configure.ac
include/libzfs.h
include/libzfs_core.h
include/sys/fs/zfs.h
lib/libzfs/libzfs_pool.c
lib/libzfs_core/libzfs_core.c
man/man8/zpool.8
module/zfs/zfs_ioctl.c
tests/runfiles/linux.run
tests/zfs-tests/include/libtest.shlib
tests/zfs-tests/tests/functional/clean_mirror/clean_mirror_common.kshlib
tests/zfs-tests/tests/functional/cli_root/Makefile.am
tests/zfs-tests/tests/functional/cli_root/zpool_create/create-o_ashift.ksh
tests/zfs-tests/tests/functional/cli_root/zpool_sync/Makefile.am [new file with mode: 0644]
tests/zfs-tests/tests/functional/cli_root/zpool_sync/cleanup.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zpool_sync/setup.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zpool_sync/zpool_sync_001_pos.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zpool_sync/zpool_sync_002_neg.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/upgrade/upgrade_userobj_001_pos.ksh