mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 03:08:51 +03:00
Vdev Properties Feature
Add properties, similar to pool properties, to each vdev. This makes use of the existing per-vdev ZAP that was added as part of device evacuation/removal. A large number of read-only properties are exposed, many of the members of struct vdev_t, that provide useful statistics. Adds support for read-only "removing" vdev property. Adds the "allocating" property that defaults to "on" and can be set to "off" to prevent future allocations from that top-level vdev. Supports user-defined vdev properties. Includes support for properties.vdev in SYSFS. Co-authored-by: Allan Jude <allan@klarasystems.com> Co-authored-by: Mark Maybee <mark.maybee@delphix.com> Reviewed-by: Matthew Ahrens <mahrens@delphix.com> Reviewed-by: Mark Maybee <mark.maybee@delphix.com> Signed-off-by: Allan Jude <allan@klarasystems.com> Closes #11711
This commit is contained in:
+10
-1
@@ -99,6 +99,13 @@ _ZFS_PROP_H void zpool_prop_init(void);
|
||||
_ZFS_PROP_H zprop_type_t zpool_prop_get_type(zpool_prop_t);
|
||||
_ZFS_PROP_H zprop_desc_t *zpool_prop_get_table(void);
|
||||
|
||||
/*
|
||||
* vdev property functions
|
||||
*/
|
||||
_ZFS_PROP_H void vdev_prop_init(void);
|
||||
_ZFS_PROP_H zprop_type_t vdev_prop_get_type(vdev_prop_t prop);
|
||||
_ZFS_PROP_H zprop_desc_t *vdev_prop_get_table(void);
|
||||
|
||||
/*
|
||||
* Common routines to initialize property tables
|
||||
*/
|
||||
@@ -122,11 +129,13 @@ _ZFS_PROP_H int zprop_iter_common(zprop_func, void *, boolean_t, boolean_t,
|
||||
_ZFS_PROP_H int zprop_name_to_prop(const char *, zfs_type_t);
|
||||
_ZFS_PROP_H int zprop_string_to_index(int, const char *, uint64_t *,
|
||||
zfs_type_t);
|
||||
_ZFS_PROP_H int zprop_index_to_string(int, uint64_t, const char **, zfs_type_t);
|
||||
_ZFS_PROP_H int zprop_index_to_string(int, uint64_t, const char **,
|
||||
zfs_type_t);
|
||||
_ZFS_PROP_H uint64_t zprop_random_value(int, uint64_t, zfs_type_t);
|
||||
_ZFS_PROP_H const char *zprop_values(int, zfs_type_t);
|
||||
_ZFS_PROP_H size_t zprop_width(int, boolean_t *, zfs_type_t);
|
||||
_ZFS_PROP_H boolean_t zprop_valid_for_type(int, zfs_type_t, boolean_t);
|
||||
_ZFS_PROP_H int zprop_valid_char(char c);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user