History log of /freebsd-11-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lstate.h
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 325534 08-Nov-2017 avg

MFC r324163: MFV r323530,r323533,r323534: 7431 ZFS Channel Programs, and followups

Also MFC-ed are the following fixes:
- r324164 Add several new files to the files enabled by ZFS kernel option
- r324178 unbreak kernel builds on sparc64 and powerpc
- r324194 fix incorrect use of getzfsvfs_impl in r324163
- r324292 really unbreak kernel builds on sparc64 and powerpc64


/freebsd-11-stable/cddl/contrib/opensolaris/cmd/zfs/zfs-program.8
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/zfs/zfs.8
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c
/freebsd-11-stable/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
/freebsd-11-stable/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h
/freebsd-11-stable/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c
/freebsd-11-stable/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c
/freebsd-11-stable/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.h
/freebsd-11-stable/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c
/freebsd-11-stable/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h
/freebsd-11-stable/cddl/lib/libzpool/Makefile
/freebsd-11-stable/cddl/sbin/zfs/Makefile
/freebsd-11-stable/sys/cddl/compat/opensolaris/kern/opensolaris_sunddi.c
/freebsd-11-stable/sys/cddl/compat/opensolaris/sys/sunddi.h
/freebsd-11-stable/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c
/freebsd-11-stable/sys/cddl/contrib/opensolaris/uts/common/Makefile.files
/freebsd-11-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c
/freebsd-11-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c
/freebsd-11-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c
/freebsd-11-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua
/freebsd-11-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lstrlib.c
/freebsd-11-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h
/freebsd-11-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_destroy.h
/freebsd-11-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.h
/freebsd-11-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zcp.h
/freebsd-11-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zcp_global.h
/freebsd-11-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zcp_iter.h
/freebsd-11-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zcp_prop.h
/freebsd-11-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h
/freebsd-11-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_vfsops.h
/freebsd-11-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zcp.c
/freebsd-11-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zcp_get.c
/freebsd-11-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zcp_global.c
/freebsd-11-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zcp_iter.c
/freebsd-11-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zcp_synctask.c
/freebsd-11-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
/freebsd-11-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
/freebsd-11-stable/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h
/freebsd-11-stable/sys/conf/files
/freebsd-11-stable/sys/conf/kern.pre.mk
/freebsd-11-stable/sys/modules/zfs/Makefile
# 324163 01-Oct-2017 avg

MFV r323530,r323533,r323534: 7431 ZFS Channel Programs, and followups

7431 ZFS Channel Programs

illumos/illumos-gate@dfc115332c94a2f62058ac7f2bce7631fbd20b3d
https://github.com/illumos/illumos-gate/commit/dfc115332c94a2f62058ac7f2bce7631fbd20b3d

https://www.illumos.org/issues/7431
ZFS channel programs (ZCP) adds support for performing compound ZFS
administrative actions via Lua scripts in a sandboxed environment (with time
and memory limits).
This initial commit includes both base support for running ZCP scripts, and a
small initial library of API calls which support getting properties and
listing, destroying, and promoting datasets.
Testing: in addition to the included unit tests, channel programs have been in
use at Delphix for several months for batch destroying filesystems. The
dsl_destroy_snaps_nvl() call has also been replaced with

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>
Author: Chris Williamson <chris.williamson@delphix.com>

8552 ZFS LUA code uses floating point math

illumos/illumos-gate@916c8d881190bd2c3ca20d9fca919aecff504435
https://github.com/illumos/illumos-gate/commit/916c8d881190bd2c3ca20d9fca919aecff504435

https://www.illumos.org/issues/8552
In the LUA interpreter used by "zfs program", the lua format() function
accidentally includes support for '%f' and friends, which can cause compilation
problems when building on platforms that don't support floating-point math in
the kernel (e.g. sparc). Support for '%f' friends (%f %e %E %g %G) should be
removed, since there's no way to supply a floating-point value anyway (all
numbers in ZFS LUA are int64_t's).

Reviewed by: Yuri Pankov <yuripv@gmx.com>
Reviewed by: Igor Kozhukhov <igor@dilos.org>
Approved by: Dan McDonald <danmcd@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>

8590 memory leak in dsl_destroy_snapshots_nvl()

illumos/illumos-gate@e6ab4525d156c82445c116ecf6b2b874d5e9009d
https://github.com/illumos/illumos-gate/commit/e6ab4525d156c82445c116ecf6b2b874d5e9009d

https://www.illumos.org/issues/8590
In dsl_destroy_snapshots_nvl(), "snaps_normalized" is not freed after it is
added to "arg".

Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed by: Steve Gonczi <steve.gonczi@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>

FreeBSD notes:
- zfs-program.8 manual page is taken almost as is from the vendor repository,
no FreeBSD-ification done
- fixed multiple instances of NULL being used where an integer is expected
- replaced ETIME and ECHRNG with ETIMEDOUT and EDOM respectively

This commit adds a modified version of Lua 5.2.4 under
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua, mirroring the
upstream. See README.zfs in that directory for the description of Lua
customizations.
See zfs-program.8 on how to use the new feature.

MFC after: 5 weeks
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D12528


# 323530 13-Sep-2017 avg

7431 ZFS Channel Programs

illumos/illumos-gate@dfc115332c94a2f62058ac7f2bce7631fbd20b3d
https://github.com/illumos/illumos-gate/commit/dfc115332c94a2f62058ac7f2bce7631fbd20b3d

https://www.illumos.org/issues/7431
ZFS channel programs (ZCP) adds support for performing compound ZFS
administrative actions via Lua scripts in a sandboxed environment (with time
and memory limits).
This initial commit includes both base support for running ZCP scripts, and a
small initial library of API calls which support getting properties and
listing, destroying, and promoting datasets.
Testing: in addition to the included unit tests, channel programs have been in
use at Delphix for several months for batch destroying filesystems. The
dsl_destroy_snaps_nvl() call has also been replaced with

For reference, the new zfs-program manpage is included below.
ZFS-PROGRAM(1M) 1M ZFS-PROGRAM(1M)

NAME
zfs program – executes ZFS channel programs

SYNOPSIS
zfs program [-t timeout] [-m memory-limit] pool script

DESCRIPTION
The ZFS channel program interface allows ZFS administrative operations to
be run programmatically as a Lua script. The entire script is executed
atomically, with no other administrative operations taking effect
concurrently. A library of ZFS calls is made available to channel program
scripts. Channel programs may only be run with root privileges.

A modified version of the Lua 5.2 interpreter is used to run channel
program scripts. The Lua 5.2 manual can be found at:

http://www.lua.org/manual/5.2/
...

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>
Author: Chris Williamson <chris.williamson@delphix.com>