]> git.proxmox.com Git - mirror_zfs.git/commit
Add zfs module feature and property info to sysfs
authorDon Brady <don.brady@delphix.com>
Sun, 2 Sep 2018 19:09:53 +0000 (15:09 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Sun, 2 Sep 2018 19:09:53 +0000 (12:09 -0700)
commite8bcb693d6a19962291e4429f2dc4ce60693bef7
treea4afbb8d0562aae23e9fd8fd561fd2182b14db8e
parentbb91178e60df553071ce2e18b0067ef703f7b583
Add zfs module feature and property info to sysfs

This extends our sysfs '/sys/module/zfs' entry to include feature
and property attributes. The primary consumer of this information
is user processes, like the zfs CLI, that need to know what the
current loaded ZFS module supports. The libzfs binary will consult
this information when instantiating the zfs and zpool property
tables and the pool features table.

This introduces 4 kernel objects (dirs) into '/sys/module/zfs'
with corresponding attributes (files):
  features.runtime
  features.pool
  properties.dataset
  properties.pool

Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Don Brady <don.brady@delphix.com>
Closes #7706
24 files changed:
configure.ac
include/sys/Makefile.am
include/sys/zfs_sysfs.h [new file with mode: 0644]
include/zfeature_common.h
include/zfs_prop.h
lib/libzfs/libzfs_util.c
lib/libzpool/Makefile.am
module/zcommon/zfeature_common.c
module/zcommon/zfs_prop.c
module/zcommon/zprop_common.c
module/zfs/Makefile.in
module/zfs/zfs_ioctl.c
module/zfs/zfs_sysfs.c [new file with mode: 0644]
tests/runfiles/linux.run
tests/zfs-tests/tests/functional/cli_root/Makefile.am
tests/zfs-tests/tests/functional/cli_root/zfs_sysfs/Makefile.am [new file with mode: 0644]
tests/zfs-tests/tests/functional/cli_root/zfs_sysfs/cleanup.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_sysfs/setup.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_sysfs/zfeature_set_unsupported.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_sysfs/zfs_get_unsupported.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_sysfs/zfs_set_unsupported.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_sysfs/zfs_sysfs_live.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_sysfs/zpool_get_unsupported.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_sysfs/zpool_set_unsupported.ksh [new file with mode: 0755]