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
This commit is contained in:
Don Brady
2018-09-02 15:09:53 -04:00
committed by Brian Behlendorf
parent bb91178e60
commit e8bcb693d6
24 changed files with 1183 additions and 1 deletions
+1
View File
@@ -78,6 +78,7 @@ typedef struct {
boolean_t pd_rightalign; /* column alignment for "zfs list" */
boolean_t pd_visible; /* do we list this property with the */
/* "zfs get" help message */
boolean_t pd_zfs_mod_supported; /* supported by running zfs module */
const zprop_index_t *pd_table; /* for index properties, a table */
/* defining the possible values */
size_t pd_table_size; /* number of entries in pd_table[] */