Lines Matching defs:zhp
220 zpool_get_config(zpool_handle_t *zhp, nvlist_t **oldconfig)
223 *oldconfig = zhp->zpool_old_config;
224 return (zhp->zpool_config);
232 zpool_get_features(zpool_handle_t *zhp)
236 config = zpool_get_config(zhp, NULL);
243 error = zpool_refresh_stats(zhp, &missing);
248 config = zpool_get_config(zhp, NULL);
265 zpool_refresh_stats(zpool_handle_t *zhp, boolean_t *missing)
270 libzfs_handle_t *hdl = zhp->zpool_hdl;
273 (void) strcpy(zc.zc_name, zhp->zpool_name);
275 if (zhp->zpool_config_size == 0)
276 zhp->zpool_config_size = 1 << 16;
278 if (zcmd_alloc_dst_nvlist(hdl, &zc, zhp->zpool_config_size) != 0)
282 if (ioctl(zhp->zpool_hdl->libzfs_fd, ZFS_IOC_POOL_STATS,
300 zhp->zpool_state = POOL_STATE_UNAVAIL;
312 zhp->zpool_config_size = zc.zc_nvlist_dst_size;
314 if (zhp->zpool_config != NULL) {
317 verify(nvlist_lookup_uint64(zhp->zpool_config,
322 nvlist_free(zhp->zpool_old_config);
325 nvlist_free(zhp->zpool_config);
326 zhp->zpool_old_config = NULL;
328 zhp->zpool_old_config = zhp->zpool_config;
332 zhp->zpool_config = config;
334 zhp->zpool_state = POOL_STATE_UNAVAIL;
336 zhp->zpool_state = POOL_STATE_ACTIVE;
404 zpool_handle_t *zhp;
423 if (zpool_open_silent(hdl, cn->cn_name, &zhp) != 0) {
428 if (zhp == NULL)
431 if ((ret = func(zhp, data)) != 0) {
449 zfs_handle_t *zhp;
461 if ((zhp = make_dataset_handle(hdl, cn->cn_name)) == NULL)
464 if ((ret = func(zhp, data)) != 0)