From 2a673e76a928cca4df7794cdcaa02e0be149c4da Mon Sep 17 00:00:00 2001 From: Allan Jude Date: Tue, 30 Nov 2021 09:46:25 -0500 Subject: 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 Co-authored-by: Mark Maybee Reviewed-by: Matthew Ahrens Reviewed-by: Mark Maybee Signed-off-by: Allan Jude Closes #11711 --- lib/libzfs/os/freebsd/libzfs_compat.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/libzfs/os') diff --git a/lib/libzfs/os/freebsd/libzfs_compat.c b/lib/libzfs/os/freebsd/libzfs_compat.c index f143f9cb6..e3f17662a 100644 --- a/lib/libzfs/os/freebsd/libzfs_compat.c +++ b/lib/libzfs/os/freebsd/libzfs_compat.c @@ -305,6 +305,10 @@ zfs_jail(zfs_handle_t *zhp, int jailid, int attach) zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, "bookmarks can not be jailed")); return (zfs_error(hdl, EZFS_BADTYPE, errbuf)); + case ZFS_TYPE_VDEV: + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, + "vdevs can not be jailed")); + return (zfs_error(hdl, EZFS_BADTYPE, errbuf)); case ZFS_TYPE_POOL: case ZFS_TYPE_FILESYSTEM: /* OK */ -- cgit v1.2.3