aboutsummaryrefslogtreecommitdiffstats
path: root/include/libzfs.h
diff options
context:
space:
mode:
authorTony Hutter <[email protected]>2023-09-21 08:36:26 -0700
committerGitHub <[email protected]>2023-09-21 08:36:26 -0700
commitb53077a9e75133e245344f5d6f5805b16f4512d1 (patch)
treee75c30e56dae6b228ae5a5674d00ebeae787e2ae /include/libzfs.h
parent4647353c8b2b5ca506da45bb9b01e1f3ef521847 (diff)
Add zfs_prepare_disk script for disk firmware install
Have libzfs call a special `zfs_prepare_disk` script before a disk is included into the pool. The user can edit this script to add things like a disk firmware update or a disk health check. Use of the script is totally optional. See the zfs_prepare_disk manpage for full details. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Tony Hutter <[email protected]> Closes #15243
Diffstat (limited to 'include/libzfs.h')
-rw-r--r--include/libzfs.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/libzfs.h b/include/libzfs.h
index fa05b7921..0b5501bbe 100644
--- a/include/libzfs.h
+++ b/include/libzfs.h
@@ -326,6 +326,15 @@ _LIBZFS_H nvlist_t *zpool_find_vdev_by_physpath(zpool_handle_t *, const char *,
boolean_t *, boolean_t *, boolean_t *);
_LIBZFS_H int zpool_label_disk(libzfs_handle_t *, zpool_handle_t *,
const char *);
+_LIBZFS_H int zpool_prepare_disk(zpool_handle_t *zhp, nvlist_t *vdev_nv,
+ const char *prepare_str, char **lines[], int *lines_cnt);
+_LIBZFS_H int zpool_prepare_and_label_disk(libzfs_handle_t *hdl,
+ zpool_handle_t *, const char *, nvlist_t *vdev_nv, const char *prepare_str,
+ char **lines[], int *lines_cnt);
+_LIBZFS_H char ** zpool_vdev_script_alloc_env(const char *pool_name,
+ const char *vdev_path, const char *vdev_upath,
+ const char *vdev_enc_sysfs_path, const char *opt_key, const char *opt_val);
+_LIBZFS_H void zpool_vdev_script_free_env(char **env);
_LIBZFS_H uint64_t zpool_vdev_path_to_guid(zpool_handle_t *zhp,
const char *path);