Lines Matching refs: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 (zfs_ioctl(zhp->zpool_hdl, 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) {
315 nvlist_free(zhp->zpool_old_config);
317 zhp->zpool_old_config = zhp->zpool_config;
320 zhp->zpool_config = config;
322 zhp->zpool_state = POOL_STATE_UNAVAIL;
324 zhp->zpool_state = POOL_STATE_ACTIVE;
392 zpool_handle_t *zhp;
411 if (zpool_open_silent(hdl, cn->cn_name, &zhp) != 0) {
416 if (zhp == NULL)
419 if ((ret = func(zhp, data)) != 0) {
437 zfs_handle_t *zhp;
449 if ((zhp = make_dataset_handle(hdl, cn->cn_name)) == NULL)
452 if ((ret = func(zhp, data)) != 0)