Lines Matching refs:zhp
76 zpool_get_all_props(zpool_handle_t *zhp) in zpool_get_all_props() argument
79 libzfs_handle_t *hdl = zhp->zpool_hdl; in zpool_get_all_props()
81 (void) strlcpy(zc.zc_name, zhp->zpool_name, sizeof (zc.zc_name)); in zpool_get_all_props()
98 if (zcmd_read_dst_nvlist(hdl, &zc, &zhp->zpool_props) != 0) { in zpool_get_all_props()
109 zpool_props_refresh(zpool_handle_t *zhp) in zpool_props_refresh() argument
113 old_props = zhp->zpool_props; in zpool_props_refresh()
115 if (zpool_get_all_props(zhp) != 0) in zpool_props_refresh()
123 zpool_get_prop_string(zpool_handle_t *zhp, zpool_prop_t prop, in zpool_get_prop_string() argument
131 nvl = zhp->zpool_props; in zpool_get_prop_string()
149 zpool_get_prop_int(zpool_handle_t *zhp, zpool_prop_t prop, zprop_source_t *src) in zpool_get_prop_int() argument
155 if (zhp->zpool_props == NULL && zpool_get_all_props(zhp)) { in zpool_get_prop_int()
162 (nvlist_lookup_nvlist(zhp->zpool_config, in zpool_get_prop_int()
171 nvl = zhp->zpool_props; in zpool_get_prop_int()
253 zpool_get_prop(zpool_handle_t *zhp, zpool_prop_t prop, char *buf, size_t len, in zpool_get_prop() argument
263 if (zpool_get_state(zhp) == POOL_STATE_UNAVAIL) { in zpool_get_prop()
266 (void) strlcpy(buf, zpool_get_name(zhp), len); in zpool_get_prop()
274 intval = zpool_get_prop_int(zhp, prop, &src); in zpool_get_prop()
281 if (zhp->zpool_props != NULL || in zpool_get_prop()
282 zpool_get_all_props(zhp) == 0) { in zpool_get_prop()
284 zpool_get_prop_string(zhp, prop, &src), in zpool_get_prop()
299 if (zhp->zpool_props == NULL && zpool_get_all_props(zhp) && in zpool_get_prop()
305 (void) strlcpy(buf, zpool_get_prop_string(zhp, prop, &src), in zpool_get_prop()
310 intval = zpool_get_prop_int(zhp, prop, &src); in zpool_get_prop()
369 verify(nvlist_lookup_nvlist(zpool_get_config(zhp, NULL), in zpool_get_prop()
390 intval = zpool_get_prop_int(zhp, prop, &src); in zpool_get_prop()
429 zpool_is_bootable(zpool_handle_t *zhp) in zpool_is_bootable() argument
433 return (zpool_get_prop(zhp, ZPOOL_PROP_BOOTFS, bootfs, in zpool_is_bootable()
455 zpool_handle_t *zhp; in zpool_valid_proplist() local
592 if ((zhp = zpool_open_canfail(hdl, poolname)) == NULL) { in zpool_valid_proplist()
598 zpool_close(zhp); in zpool_valid_proplist()
725 zpool_set_prop(zpool_handle_t *zhp, const char *propname, const char *propval) in zpool_set_prop() argument
737 zhp->zpool_name); in zpool_set_prop()
740 return (no_memory(zhp->zpool_hdl)); in zpool_set_prop()
744 return (no_memory(zhp->zpool_hdl)); in zpool_set_prop()
747 version = zpool_get_prop_int(zhp, ZPOOL_PROP_VERSION, NULL); in zpool_set_prop()
748 if ((realprops = zpool_valid_proplist(zhp->zpool_hdl, in zpool_set_prop()
749 zhp->zpool_name, nvl, version, flags, errbuf)) == NULL) { in zpool_set_prop()
760 (void) strlcpy(zc.zc_name, zhp->zpool_name, sizeof (zc.zc_name)); in zpool_set_prop()
762 if (zcmd_write_src_nvlist(zhp->zpool_hdl, &zc, nvl) != 0) { in zpool_set_prop()
767 ret = zfs_ioctl(zhp->zpool_hdl, ZFS_IOC_POOL_SET_PROPS, &zc); in zpool_set_prop()
773 (void) zpool_standard_error(zhp->zpool_hdl, errno, errbuf); in zpool_set_prop()
775 (void) zpool_props_refresh(zhp); in zpool_set_prop()
781 zpool_expand_proplist(zpool_handle_t *zhp, zprop_list_t **plp) in zpool_expand_proplist() argument
783 libzfs_handle_t *hdl = zhp->zpool_hdl; in zpool_expand_proplist()
798 features = zpool_get_features(zhp); in zpool_expand_proplist()
863 zpool_get_prop(zhp, entry->pl_prop, buf, sizeof (buf), in zpool_expand_proplist()
877 zpool_prop_get_feature(zpool_handle_t *zhp, const char *propname, char *buf, in zpool_prop_get_feature() argument
882 nvlist_t *features = zpool_get_features(zhp); in zpool_prop_get_feature()
1040 zpool_handle_t *zhp; in zpool_open_canfail() local
1053 if ((zhp = zfs_alloc(hdl, sizeof (zpool_handle_t))) == NULL) in zpool_open_canfail()
1056 zhp->zpool_hdl = hdl; in zpool_open_canfail()
1057 (void) strlcpy(zhp->zpool_name, pool, sizeof (zhp->zpool_name)); in zpool_open_canfail()
1059 if (zpool_refresh_stats(zhp, &missing) != 0) { in zpool_open_canfail()
1060 zpool_close(zhp); in zpool_open_canfail()
1068 zpool_close(zhp); in zpool_open_canfail()
1072 return (zhp); in zpool_open_canfail()
1082 zpool_handle_t *zhp; in zpool_open_silent() local
1085 if ((zhp = zfs_alloc(hdl, sizeof (zpool_handle_t))) == NULL) in zpool_open_silent()
1088 zhp->zpool_hdl = hdl; in zpool_open_silent()
1089 (void) strlcpy(zhp->zpool_name, pool, sizeof (zhp->zpool_name)); in zpool_open_silent()
1091 if (zpool_refresh_stats(zhp, &missing) != 0) { in zpool_open_silent()
1092 zpool_close(zhp); in zpool_open_silent()
1097 zpool_close(zhp); in zpool_open_silent()
1102 *ret = zhp; in zpool_open_silent()
1113 zpool_handle_t *zhp; in zpool_open() local
1115 if ((zhp = zpool_open_canfail(hdl, pool)) == NULL) in zpool_open()
1118 if (zhp->zpool_state == POOL_STATE_UNAVAIL) { in zpool_open()
1120 dgettext(TEXT_DOMAIN, "cannot open '%s'"), zhp->zpool_name); in zpool_open()
1121 zpool_close(zhp); in zpool_open()
1125 return (zhp); in zpool_open()
1132 zpool_close(zpool_handle_t *zhp) in zpool_close() argument
1134 nvlist_free(zhp->zpool_config); in zpool_close()
1135 nvlist_free(zhp->zpool_old_config); in zpool_close()
1136 nvlist_free(zhp->zpool_props); in zpool_close()
1137 free(zhp); in zpool_close()
1144 zpool_get_name(zpool_handle_t *zhp) in zpool_get_name() argument
1146 return (zhp->zpool_name); in zpool_get_name()
1154 zpool_get_state(zpool_handle_t *zhp) in zpool_get_state() argument
1156 return (zhp->zpool_state); in zpool_get_state()
1354 zpool_destroy(zpool_handle_t *zhp, const char *log_str) in zpool_destroy() argument
1358 libzfs_handle_t *hdl = zhp->zpool_hdl; in zpool_destroy()
1361 if (zhp->zpool_state == POOL_STATE_ACTIVE && in zpool_destroy()
1362 (zfp = zfs_open(hdl, zhp->zpool_name, ZFS_TYPE_FILESYSTEM)) == NULL) in zpool_destroy()
1365 (void) strlcpy(zc.zc_name, zhp->zpool_name, sizeof (zc.zc_name)); in zpool_destroy()
1370 "cannot destroy '%s'"), zhp->zpool_name); in zpool_destroy()
1397 zpool_checkpoint(zpool_handle_t *zhp) in zpool_checkpoint() argument
1399 libzfs_handle_t *hdl = zhp->zpool_hdl; in zpool_checkpoint()
1403 error = lzc_pool_checkpoint(zhp->zpool_name); in zpool_checkpoint()
1406 "cannot checkpoint '%s'"), zhp->zpool_name); in zpool_checkpoint()
1418 zpool_discard_checkpoint(zpool_handle_t *zhp) in zpool_discard_checkpoint() argument
1420 libzfs_handle_t *hdl = zhp->zpool_hdl; in zpool_discard_checkpoint()
1424 error = lzc_pool_checkpoint_discard(zhp->zpool_name); in zpool_discard_checkpoint()
1427 "cannot discard checkpoint in '%s'"), zhp->zpool_name); in zpool_discard_checkpoint()
1440 zpool_add(zpool_handle_t *zhp, nvlist_t *nvroot) in zpool_add() argument
1444 libzfs_handle_t *hdl = zhp->zpool_hdl; in zpool_add()
1450 "cannot add to '%s'"), zhp->zpool_name); in zpool_add()
1452 if (zpool_get_prop_int(zhp, ZPOOL_PROP_VERSION, NULL) < in zpool_add()
1461 if (zpool_get_prop_int(zhp, ZPOOL_PROP_VERSION, NULL) < in zpool_add()
1472 (void) strlcpy(zc.zc_name, zhp->zpool_name, sizeof (zc.zc_name)); in zpool_add()
1540 zpool_export_common(zpool_handle_t *zhp, boolean_t force, boolean_t hardforce, in zpool_export_common() argument
1547 "cannot export '%s'"), zhp->zpool_name); in zpool_export_common()
1549 (void) strlcpy(zc.zc_name, zhp->zpool_name, sizeof (zc.zc_name)); in zpool_export_common()
1554 if (zfs_ioctl(zhp->zpool_hdl, ZFS_IOC_POOL_EXPORT, &zc) != 0) { in zpool_export_common()
1557 zfs_error_aux(zhp->zpool_hdl, dgettext(TEXT_DOMAIN, in zpool_export_common()
1561 zhp->zpool_name, zhp->zpool_name); in zpool_export_common()
1562 return (zfs_error(zhp->zpool_hdl, EZFS_ACTIVE_SPARE, in zpool_export_common()
1565 return (zpool_standard_error_fmt(zhp->zpool_hdl, errno, in zpool_export_common()
1574 zpool_export(zpool_handle_t *zhp, boolean_t force, const char *log_str) in zpool_export() argument
1576 return (zpool_export_common(zhp, force, B_FALSE, log_str)); in zpool_export()
1580 zpool_export_force(zpool_handle_t *zhp, const char *log_str) in zpool_export_force() argument
1582 return (zpool_export_common(zhp, B_TRUE, B_TRUE, log_str)); in zpool_export_force()
2020 zpool_handle_t *zhp; in zpool_import_props() local
2025 if (zpool_open_silent(hdl, thename, &zhp) != 0) in zpool_import_props()
2027 else if (zhp != NULL) in zpool_import_props()
2028 zpool_close(zhp); in zpool_import_props()
2047 zpool_translate_vdev_guids(zpool_handle_t *zhp, nvlist_t *vds, in zpool_translate_vdev_guids() argument
2058 nvlist_t *tgt = zpool_find_vdev(zhp, vd_path, &spare, &cache, in zpool_translate_vdev_guids()
2096 zpool_scan(zpool_handle_t *zhp, pool_scan_func_t func, pool_scrub_cmd_t cmd) in zpool_scan() argument
2101 libzfs_handle_t *hdl = zhp->zpool_hdl; in zpool_scan()
2103 (void) strlcpy(zc.zc_name, zhp->zpool_name, sizeof (zc.zc_name)); in zpool_scan()
2146 verify(nvlist_lookup_nvlist(zhp->zpool_config, in zpool_scan()
2189 zpool_initialize(zpool_handle_t *zhp, pool_initialize_func_t cmd_type, in zpool_initialize() argument
2201 err = zpool_translate_vdev_guids(zhp, vds, vdev_guids, in zpool_initialize()
2205 err = lzc_initialize(zhp->zpool_name, cmd_type, in zpool_initialize()
2233 (void) zfs_error_fmt(zhp->zpool_hdl, vd_error, in zpool_initialize()
2245 return (zpool_standard_error(zhp->zpool_hdl, err, msg)); in zpool_initialize()
2272 zpool_trim(zpool_handle_t *zhp, pool_trim_func_t cmd_type, nvlist_t *vds, in zpool_trim() argument
2284 err = zpool_translate_vdev_guids(zhp, vds, vdev_guids, in zpool_trim()
2287 err = lzc_trim(zhp->zpool_name, cmd_type, trim_flags->rate, in zpool_trim()
2325 (void) zfs_error_fmt(zhp->zpool_hdl, vd_error, in zpool_trim()
2337 return (zpool_standard_error(zhp->zpool_hdl, err, msg)); in zpool_trim()
2578 zpool_find_vdev_by_physpath(zpool_handle_t *zhp, const char *ppath, in zpool_find_vdev_by_physpath() argument
2586 verify(nvlist_lookup_nvlist(zhp->zpool_config, ZPOOL_CONFIG_VDEV_TREE, in zpool_find_vdev_by_physpath()
2615 zpool_find_vdev(zpool_handle_t *zhp, const char *path, boolean_t *avail_spare, in zpool_find_vdev() argument
2638 verify(nvlist_lookup_nvlist(zhp->zpool_config, ZPOOL_CONFIG_VDEV_TREE, in zpool_find_vdev()
2793 zpool_get_physpath(zpool_handle_t *zhp, char *physpath, size_t phypath_size) in zpool_get_physpath() argument
2795 return (zpool_get_config_physpath(zhp->zpool_config, physpath, in zpool_get_physpath()
2867 zpool_vdev_online(zpool_handle_t *zhp, const char *path, int flags, in zpool_vdev_online() argument
2875 libzfs_handle_t *hdl = zhp->zpool_hdl; in zpool_vdev_online()
2886 (void) strlcpy(zc.zc_name, zhp->zpool_name, sizeof (zc.zc_name)); in zpool_vdev_online()
2887 if ((tgt = zpool_find_vdev(zhp, path, &avail_spare, &l2cache, in zpool_vdev_online()
2897 zpool_get_prop_int(zhp, ZPOOL_PROP_AUTOEXPAND, NULL)) && in zpool_vdev_online()
2942 zpool_vdev_offline(zpool_handle_t *zhp, const char *path, boolean_t istmp) in zpool_vdev_offline() argument
2948 libzfs_handle_t *hdl = zhp->zpool_hdl; in zpool_vdev_offline()
2953 (void) strlcpy(zc.zc_name, zhp->zpool_name, sizeof (zc.zc_name)); in zpool_vdev_offline()
2954 if ((tgt = zpool_find_vdev(zhp, path, &avail_spare, &l2cache, in zpool_vdev_offline()
2992 zpool_vdev_fault(zpool_handle_t *zhp, uint64_t guid, vdev_aux_t aux) in zpool_vdev_fault() argument
2996 libzfs_handle_t *hdl = zhp->zpool_hdl; in zpool_vdev_fault()
3001 (void) strlcpy(zc.zc_name, zhp->zpool_name, sizeof (zc.zc_name)); in zpool_vdev_fault()
3027 zpool_vdev_degrade(zpool_handle_t *zhp, uint64_t guid, vdev_aux_t aux) in zpool_vdev_degrade() argument
3031 libzfs_handle_t *hdl = zhp->zpool_hdl; in zpool_vdev_degrade()
3036 (void) strlcpy(zc.zc_name, zhp->zpool_name, sizeof (zc.zc_name)); in zpool_vdev_degrade()
3080 zpool_vdev_attach(zpool_handle_t *zhp, in zpool_vdev_attach() argument
3093 libzfs_handle_t *hdl = zhp->zpool_hdl; in zpool_vdev_attach()
3094 boolean_t rootpool = zpool_is_bootable(zhp); in zpool_vdev_attach()
3103 (void) strlcpy(zc.zc_name, zhp->zpool_name, sizeof (zc.zc_name)); in zpool_vdev_attach()
3104 if ((tgt = zpool_find_vdev(zhp, old_disk, &avail_spare, &l2cache, in zpool_vdev_attach()
3124 verify(nvlist_lookup_nvlist(zpool_get_config(zhp, NULL), in zpool_vdev_attach()
3130 newvd = zpool_find_vdev(zhp, newname, &avail_spare, &l2cache, NULL); in zpool_vdev_attach()
3178 uint64_t version = zpool_get_prop_int(zhp, in zpool_vdev_attach()
3252 zpool_vdev_detach(zpool_handle_t *zhp, const char *path) in zpool_vdev_detach() argument
3258 libzfs_handle_t *hdl = zhp->zpool_hdl; in zpool_vdev_detach()
3263 (void) strlcpy(zc.zc_name, zhp->zpool_name, sizeof (zc.zc_name)); in zpool_vdev_detach()
3264 if ((tgt = zpool_find_vdev(zhp, path, &avail_spare, &l2cache, in zpool_vdev_detach()
3316 find_vdev_entry(zpool_handle_t *zhp, nvlist_t **mchild, uint_t mchildren, in find_vdev_entry() argument
3323 char *mpath = zpool_vdev_name(zhp->zpool_hdl, zhp, in find_vdev_entry()
3327 char *spath = zpool_vdev_name(zhp->zpool_hdl, zhp, in find_vdev_entry()
3349 zpool_vdev_split(zpool_handle_t *zhp, char *newname, nvlist_t **newroot, in zpool_vdev_split() argument
3357 libzfs_handle_t *hdl = zhp->zpool_hdl; in zpool_vdev_split()
3363 dgettext(TEXT_DOMAIN, "Unable to split %s"), zhp->zpool_name); in zpool_vdev_split()
3368 if ((config = zpool_get_config(zhp, NULL)) == NULL) { in zpool_vdev_split()
3380 if ((zc_props = zpool_valid_proplist(hdl, zhp->zpool_name, in zpool_vdev_split()
3448 (entry = find_vdev_entry(zhp, mchild, mchildren, in zpool_vdev_split()
3513 (void) strlcpy(zc.zc_name, zhp->zpool_name, sizeof (zc.zc_name)); in zpool_vdev_split()
3557 zpool_vdev_remove(zpool_handle_t *zhp, const char *path) in zpool_vdev_remove() argument
3563 libzfs_handle_t *hdl = zhp->zpool_hdl; in zpool_vdev_remove()
3569 (void) strlcpy(zc.zc_name, zhp->zpool_name, sizeof (zc.zc_name)); in zpool_vdev_remove()
3570 if ((tgt = zpool_find_vdev(zhp, path, &avail_spare, &l2cache, in zpool_vdev_remove()
3574 version = zpool_get_prop_int(zhp, ZPOOL_PROP_VERSION, NULL); in zpool_vdev_remove()
3608 zpool_vdev_remove_cancel(zpool_handle_t *zhp) in zpool_vdev_remove_cancel() argument
3612 libzfs_handle_t *hdl = zhp->zpool_hdl; in zpool_vdev_remove_cancel()
3617 (void) strlcpy(zc.zc_name, zhp->zpool_name, sizeof (zc.zc_name)); in zpool_vdev_remove_cancel()
3627 zpool_vdev_indirect_size(zpool_handle_t *zhp, const char *path, in zpool_vdev_indirect_size() argument
3633 libzfs_handle_t *hdl = zhp->zpool_hdl; in zpool_vdev_indirect_size()
3639 if ((tgt = zpool_find_vdev(zhp, path, &avail_spare, &l2cache, in zpool_vdev_indirect_size()
3660 zpool_clear(zpool_handle_t *zhp, const char *path, nvlist_t *rewindnvl) in zpool_clear() argument
3667 libzfs_handle_t *hdl = zhp->zpool_hdl; in zpool_clear()
3678 zhp->zpool_name); in zpool_clear()
3680 (void) strlcpy(zc.zc_name, zhp->zpool_name, sizeof (zc.zc_name)); in zpool_clear()
3682 if ((tgt = zpool_find_vdev(zhp, path, &avail_spare, in zpool_clear()
3700 if (zcmd_alloc_dst_nvlist(hdl, &zc, zhp->zpool_config_size * 2) != 0) in zpool_clear()
3736 zpool_vdev_clear(zpool_handle_t *zhp, uint64_t guid) in zpool_vdev_clear() argument
3740 libzfs_handle_t *hdl = zhp->zpool_hdl; in zpool_vdev_clear()
3746 (void) strlcpy(zc.zc_name, zhp->zpool_name, sizeof (zc.zc_name)); in zpool_vdev_clear()
3760 zpool_reguid(zpool_handle_t *zhp) in zpool_reguid() argument
3763 libzfs_handle_t *hdl = zhp->zpool_hdl; in zpool_reguid()
3767 dgettext(TEXT_DOMAIN, "cannot reguid '%s'"), zhp->zpool_name); in zpool_reguid()
3769 (void) strlcpy(zc.zc_name, zhp->zpool_name, sizeof (zc.zc_name)); in zpool_reguid()
3780 zpool_reopen(zpool_handle_t *zhp) in zpool_reopen() argument
3784 libzfs_handle_t *hdl = zhp->zpool_hdl; in zpool_reopen()
3788 zhp->zpool_name); in zpool_reopen()
3790 (void) strlcpy(zc.zc_name, zhp->zpool_name, sizeof (zc.zc_name)); in zpool_reopen()
3798 zpool_sync_one(zpool_handle_t *zhp, void *data) in zpool_sync_one() argument
3801 libzfs_handle_t *hdl = zpool_get_handle(zhp); in zpool_sync_one()
3802 const char *pool_name = zpool_get_name(zhp); in zpool_sync_one()
3953 set_path(zpool_handle_t *zhp, nvlist_t *nv, const char *path) in set_path() argument
3957 (void) strncpy(zc.zc_name, zhp->zpool_name, sizeof (zc.zc_name)); in set_path()
3962 (void) ioctl(zhp->zpool_hdl->libzfs_fd, ZFS_IOC_VDEV_SETPATH, &zc); in set_path()
3975 zpool_vdev_refresh_path(libzfs_handle_t *hdl, zpool_handle_t *zhp, nvlist_t *nv) in zpool_vdev_refresh_path() argument
4017 set_path(zhp, nv, newpath); in zpool_vdev_refresh_path()
4034 zpool_vdev_name(libzfs_handle_t *hdl, zpool_handle_t *zhp, nvlist_t *nv, in zpool_vdev_name() argument
4045 if (zhp != NULL && strcmp(type, "root") == 0) in zpool_vdev_name()
4046 return (zfs_strdup(hdl, zpool_get_name(zhp))); in zpool_vdev_name()
4080 zhp == NULL) { in zpool_vdev_name()
4089 zpool_vdev_refresh_path(hdl, zhp, nv); in zpool_vdev_name()
4180 zpool_get_errlog(zpool_handle_t *zhp, nvlist_t **nverrlistp) in zpool_get_errlog() argument
4192 verify(nvlist_lookup_uint64(zhp->zpool_config, ZPOOL_CONFIG_ERRCOUNT, in zpool_get_errlog()
4196 if ((zc.zc_nvlist_dst = (uintptr_t)zfs_alloc(zhp->zpool_hdl, in zpool_get_errlog()
4200 (void) strcpy(zc.zc_name, zhp->zpool_name); in zpool_get_errlog()
4202 if (ioctl(zhp->zpool_hdl->libzfs_fd, ZFS_IOC_ERROR_LOG, in zpool_get_errlog()
4209 dst = zfs_alloc(zhp->zpool_hdl, count * in zpool_get_errlog()
4272 return (no_memory(zhp->zpool_hdl)); in zpool_get_errlog()
4279 zpool_upgrade(zpool_handle_t *zhp, uint64_t new_version) in zpool_upgrade() argument
4282 libzfs_handle_t *hdl = zhp->zpool_hdl; in zpool_upgrade()
4284 (void) strcpy(zc.zc_name, zhp->zpool_name); in zpool_upgrade()
4290 zhp->zpool_name)); in zpool_upgrade()
4331 get_history(zpool_handle_t *zhp, char *buf, uint64_t *off, uint64_t *len) in get_history() argument
4334 libzfs_handle_t *hdl = zhp->zpool_hdl; in get_history()
4336 (void) strlcpy(zc.zc_name, zhp->zpool_name, sizeof (zc.zc_name)); in get_history()
4348 zhp->zpool_name)); in get_history()
4352 "'%s'"), zhp->zpool_name)); in get_history()
4356 "'%s', pool must be upgraded"), zhp->zpool_name)); in get_history()
4360 "cannot get history for '%s'"), zhp->zpool_name)); in get_history()
4374 zpool_get_history(zpool_handle_t *zhp, nvlist_t **nvhisp, uint64_t *off, in zpool_get_history() argument
4392 if ((err = get_history(zhp, buf, off, &bytes_read)) != 0) in zpool_get_history()
4433 zpool_obj_to_path(zpool_handle_t *zhp, uint64_t dsobj, uint64_t obj, in zpool_obj_to_path() argument
4448 (void) strlcpy(zc.zc_name, zhp->zpool_name, sizeof (zc.zc_name)); in zpool_obj_to_path()
4450 if (ioctl(zhp->zpool_hdl->libzfs_fd, in zpool_obj_to_path()
4460 mounted = is_mounted(zhp->zpool_hdl, dsname, &mntpnt); in zpool_obj_to_path()
4465 if (ioctl(zhp->zpool_hdl->libzfs_fd, ZFS_IOC_OBJ_TO_PATH, in zpool_obj_to_path()
4481 zpool_set_bootenv(zpool_handle_t *zhp, const nvlist_t *envmap) in zpool_set_bootenv() argument
4483 int error = lzc_set_bootenv(zhp->zpool_name, envmap); in zpool_set_bootenv()
4485 (void) zpool_standard_error_fmt(zhp->zpool_hdl, error, in zpool_set_bootenv()
4487 "error setting bootenv in pool '%s'"), zhp->zpool_name); in zpool_set_bootenv()
4494 zpool_get_bootenv(zpool_handle_t *zhp, nvlist_t **nvlp) in zpool_get_bootenv() argument
4500 error = lzc_get_bootenv(zhp->zpool_name, &nvl); in zpool_get_bootenv()
4502 (void) zpool_standard_error_fmt(zhp->zpool_hdl, error, in zpool_get_bootenv()
4504 "error getting bootenv in pool '%s'"), zhp->zpool_name); in zpool_get_bootenv()
4593 zpool_label_disk(libzfs_handle_t *hdl, zpool_handle_t *zhp, const char *name, in zpool_label_disk() argument
4608 if (zhp) { in zpool_label_disk()
4611 verify(nvlist_lookup_nvlist(zhp->zpool_config, in zpool_label_disk()
4614 if (zhp->zpool_start_block == 0) in zpool_label_disk()
4617 start_block = zhp->zpool_start_block; in zpool_label_disk()
4618 zhp->zpool_start_block = start_block; in zpool_label_disk()
4816 zpool_handle_t *zhp = NULL; in zvol_check_dump_config() local
4856 if ((zhp = zpool_open(hdl, poolname)) == NULL) { in zvol_check_dump_config()
4862 config = zpool_get_config(zhp, NULL); in zvol_check_dump_config()
4880 if (zhp) in zvol_check_dump_config()
4881 zpool_close(zhp); in zvol_check_dump_config()