]> granicus.if.org Git - zfs/commit
OpenZFS 7431 - ZFS Channel Programs
authorChris Williamson <chris.williamson@delphix.com>
Thu, 8 Feb 2018 16:16:23 +0000 (09:16 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 8 Feb 2018 23:28:18 +0000 (15:28 -0800)
commitd99a015343425a1c856c900aa8223016400ac2dc
treef6ab517b27b650c32127953b74567baa99951d08
parent8824a7f133e4402f7176115cf8efd535c8cbdab2
OpenZFS 7431 - ZFS Channel Programs

Authored by: Chris Williamson <chris.williamson@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: John Kennedy <john.kennedy@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Approved by: Garrett D'Amore <garrett@damore.org>
Ported-by: Don Brady <don.brady@delphix.com>
Ported-by: John Kennedy <john.kennedy@delphix.com>
OpenZFS-issue: https://www.illumos.org/issues/7431
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/dfc11533

Porting Notes:
* The CLI long option arguments for '-t' and '-m' don't parse on linux
* Switched from kmem_alloc to vmem_alloc in zcp_lua_alloc
* Lua implementation is built as its own module (zlua.ko)
* Lua headers consumed directly by zfs code moved to 'include/sys/lua/'
* There is no native setjmp/longjump available in stock Linux kernel.
  Brought over implementations from illumos and FreeBSD
* The get_temporary_prop() was adapted due to VFS platform differences
* Use of inline functions in lua parser to reduce stack usage per C call
* Skip some ZFS Test Suite ZCP tests on sparc64 to avoid stack overflow
179 files changed:
cmd/zfs/zfs_main.c
cmd/zpool/zpool_main.c
configure.ac
contrib/dracut/90zfs/module-setup.sh.in
contrib/initramfs/hooks/zfs.in
etc/init.d/zfs-zed.in
include/libzfs_core.h
include/libzfs_impl.h
include/sys/Makefile.am
include/sys/dsl_dataset.h
include/sys/dsl_destroy.h
include/sys/dsl_dir.h
include/sys/fs/zfs.h
include/sys/lua/Makefile.am [new file with mode: 0644]
include/sys/lua/lauxlib.h [new file with mode: 0644]
include/sys/lua/lua.h [new file with mode: 0644]
include/sys/lua/luaconf.h [new file with mode: 0644]
include/sys/lua/lualib.h [new file with mode: 0644]
include/sys/zcp.h [new file with mode: 0644]
include/sys/zcp_global.h [new file with mode: 0644]
include/sys/zcp_iter.h [new file with mode: 0644]
include/sys/zcp_prop.h [new file with mode: 0644]
include/sys/zfs_context.h
include/sys/zfs_ioctl.h
include/sys/zfs_vfsops.h
lib/libzfs/libzfs_dataset.c
lib/libzfs/libzfs_util.c
lib/libzfs_core/Makefile.am
lib/libzfs_core/libzfs_core.c
lib/libzpool/Makefile.am
man/man8/Makefile.am
man/man8/zfs-program.8 [new file with mode: 0644]
man/man8/zfs.8
module/Makefile.in
module/lua/Makefile.in [new file with mode: 0644]
module/lua/README.zfs [new file with mode: 0644]
module/lua/lapi.c [new file with mode: 0644]
module/lua/lapi.h [new file with mode: 0644]
module/lua/lauxlib.c [new file with mode: 0644]
module/lua/lbaselib.c [new file with mode: 0644]
module/lua/lbitlib.c [new file with mode: 0644]
module/lua/lcode.c [new file with mode: 0644]
module/lua/lcode.h [new file with mode: 0644]
module/lua/lcompat.c [new file with mode: 0644]
module/lua/lcorolib.c [new file with mode: 0644]
module/lua/lctype.c [new file with mode: 0644]
module/lua/lctype.h [new file with mode: 0644]
module/lua/ldebug.c [new file with mode: 0644]
module/lua/ldebug.h [new file with mode: 0644]
module/lua/ldo.c [new file with mode: 0644]
module/lua/ldo.h [new file with mode: 0644]
module/lua/ldump.c [new file with mode: 0644]
module/lua/lfunc.c [new file with mode: 0644]
module/lua/lfunc.h [new file with mode: 0644]
module/lua/lgc.c [new file with mode: 0644]
module/lua/lgc.h [new file with mode: 0644]
module/lua/llex.c [new file with mode: 0644]
module/lua/llex.h [new file with mode: 0644]
module/lua/llimits.h [new file with mode: 0644]
module/lua/lmem.c [new file with mode: 0644]
module/lua/lmem.h [new file with mode: 0644]
module/lua/lobject.c [new file with mode: 0644]
module/lua/lobject.h [new file with mode: 0644]
module/lua/lopcodes.c [new file with mode: 0644]
module/lua/lopcodes.h [new file with mode: 0644]
module/lua/lparser.c [new file with mode: 0644]
module/lua/lparser.h [new file with mode: 0644]
module/lua/lstate.c [new file with mode: 0644]
module/lua/lstate.h [new file with mode: 0644]
module/lua/lstring.c [new file with mode: 0644]
module/lua/lstring.h [new file with mode: 0644]
module/lua/lstrlib.c [new file with mode: 0644]
module/lua/ltable.c [new file with mode: 0644]
module/lua/ltable.h [new file with mode: 0644]
module/lua/ltablib.c [new file with mode: 0644]
module/lua/ltm.c [new file with mode: 0644]
module/lua/ltm.h [new file with mode: 0644]
module/lua/lundump.c [new file with mode: 0644]
module/lua/lundump.h [new file with mode: 0644]
module/lua/lvm.c [new file with mode: 0644]
module/lua/lvm.h [new file with mode: 0644]
module/lua/lzio.c [new file with mode: 0644]
module/lua/lzio.h [new file with mode: 0644]
module/lua/setjmp/setjmp.S [new file with mode: 0644]
module/lua/setjmp/setjmp_aarch64.S [new file with mode: 0644]
module/lua/setjmp/setjmp_arm.S [new file with mode: 0644]
module/lua/setjmp/setjmp_i386.S [new file with mode: 0644]
module/lua/setjmp/setjmp_mips.S [new file with mode: 0644]
module/lua/setjmp/setjmp_ppc.S [new file with mode: 0644]
module/lua/setjmp/setjmp_s390x.S [new file with mode: 0644]
module/lua/setjmp/setjmp_sparc64.S [new file with mode: 0644]
module/lua/setjmp/setjmp_x86_64.S [new file with mode: 0644]
module/zcommon/Makefile.in
module/zcommon/zfs_prop.c
module/zfs/Makefile.in
module/zfs/dsl_dataset.c
module/zfs/dsl_destroy.c
module/zfs/dsl_dir.c
module/zfs/vdev_raidz_math.c
module/zfs/zcp.c [new file with mode: 0644]
module/zfs/zcp_get.c [new file with mode: 0644]
module/zfs/zcp_global.c [new file with mode: 0644]
module/zfs/zcp_iter.c [new file with mode: 0644]
module/zfs/zcp_synctask.c [new file with mode: 0644]
module/zfs/zfs_ioctl.c
module/zfs/zfs_vfsops.c
scripts/Makefile.am
scripts/dkms.mkconf
scripts/zfs.sh
tests/runfiles/linux.run
tests/zfs-tests/cmd/Makefile.am
tests/zfs-tests/cmd/nvlist_to_lua/.gitignore [new file with mode: 0644]
tests/zfs-tests/cmd/nvlist_to_lua/Makefile.am [new file with mode: 0644]
tests/zfs-tests/cmd/nvlist_to_lua/nvlist_to_lua.c [new file with mode: 0644]
tests/zfs-tests/include/commands.cfg
tests/zfs-tests/include/libtest.shlib
tests/zfs-tests/tests/functional/Makefile.am
tests/zfs-tests/tests/functional/channel_program/Makefile.am [new file with mode: 0644]
tests/zfs-tests/tests/functional/channel_program/channel_common.kshlib [new file with mode: 0644]
tests/zfs-tests/tests/functional/channel_program/lua_core/Makefile.am [new file with mode: 0644]
tests/zfs-tests/tests/functional/channel_program/lua_core/cleanup.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/channel_program/lua_core/setup.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/channel_program/lua_core/tst.args_to_lua.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/channel_program/lua_core/tst.args_to_lua.out [new file with mode: 0644]
tests/zfs-tests/tests/functional/channel_program/lua_core/tst.args_to_lua.zcp [new file with mode: 0644]
tests/zfs-tests/tests/functional/channel_program/lua_core/tst.divide_by_zero.err [new file with mode: 0644]
tests/zfs-tests/tests/functional/channel_program/lua_core/tst.divide_by_zero.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/channel_program/lua_core/tst.divide_by_zero.zcp [new file with mode: 0644]
tests/zfs-tests/tests/functional/channel_program/lua_core/tst.integer_illegal.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/channel_program/lua_core/tst.integer_overflow.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/channel_program/lua_core/tst.language_functions_neg.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/channel_program/lua_core/tst.language_functions_pos.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/channel_program/lua_core/tst.large_prog.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/channel_program/lua_core/tst.large_prog.out [new file with mode: 0644]
tests/zfs-tests/tests/functional/channel_program/lua_core/tst.large_prog.zcp [new file with mode: 0644]
tests/zfs-tests/tests/functional/channel_program/lua_core/tst.memory_limit.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/channel_program/lua_core/tst.nested_neg.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/channel_program/lua_core/tst.nested_neg.zcp [new file with mode: 0644]
tests/zfs-tests/tests/functional/channel_program/lua_core/tst.nested_pos.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/channel_program/lua_core/tst.nested_pos.zcp [new file with mode: 0644]
tests/zfs-tests/tests/functional/channel_program/lua_core/tst.nvlist_to_lua.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/channel_program/lua_core/tst.recursive.zcp [new file with mode: 0644]
tests/zfs-tests/tests/functional/channel_program/lua_core/tst.recursive_neg.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/channel_program/lua_core/tst.recursive_pos.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/channel_program/lua_core/tst.return_nvlist_neg.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/channel_program/lua_core/tst.return_nvlist_pos.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/channel_program/lua_core/tst.return_recursive_table.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/channel_program/lua_core/tst.return_recursive_table.zcp [new file with mode: 0644]
tests/zfs-tests/tests/functional/channel_program/lua_core/tst.timeout.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/channel_program/lua_core/tst.timeout.zcp [new file with mode: 0644]
tests/zfs-tests/tests/functional/channel_program/synctask_core/Makefile.am [new file with mode: 0644]
tests/zfs-tests/tests/functional/channel_program/synctask_core/cleanup.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/channel_program/synctask_core/setup.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.destroy_fs.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.destroy_snap.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.get_count_and_limit.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.get_index_props.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.get_index_props.out [new file with mode: 0644]
tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.get_index_props.zcp [new file with mode: 0644]
tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.get_mountpoint.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.get_neg.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.get_number_props.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.get_number_props.out [new file with mode: 0644]
tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.get_number_props.zcp [new file with mode: 0644]
tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.get_string_props.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.get_string_props.out [new file with mode: 0644]
tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.get_string_props.zcp [new file with mode: 0644]
tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.get_type.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.get_userquota.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.get_written.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.list_children.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.list_clones.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.list_snapshots.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.list_system_props.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.parse_args_neg.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.promote_conflict.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.promote_conflict.zcp [new file with mode: 0644]
tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.promote_multiple.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.promote_simple.ksh [new file with mode: 0755]