Lines Matching refs:zhp

218 zpool_get_config(zpool_handle_t *zhp, nvlist_t **oldconfig)  in zpool_get_config()  argument
221 *oldconfig = zhp->zpool_old_config; in zpool_get_config()
222 return (zhp->zpool_config); in zpool_get_config()
230 zpool_get_features(zpool_handle_t *zhp) in zpool_get_features() argument
234 config = zpool_get_config(zhp, NULL); in zpool_get_features()
241 error = zpool_refresh_stats(zhp, &missing); in zpool_get_features()
246 config = zpool_get_config(zhp, NULL); in zpool_get_features()
262 zpool_refresh_stats(zpool_handle_t *zhp, boolean_t *missing) in zpool_refresh_stats() argument
267 libzfs_handle_t *hdl = zhp->zpool_hdl; in zpool_refresh_stats()
270 (void) strcpy(zc.zc_name, zhp->zpool_name); in zpool_refresh_stats()
272 if (zhp->zpool_config_size == 0) in zpool_refresh_stats()
273 zhp->zpool_config_size = 1 << 16; in zpool_refresh_stats()
275 if (zcmd_alloc_dst_nvlist(hdl, &zc, zhp->zpool_config_size) != 0) in zpool_refresh_stats()
279 if (ioctl(zhp->zpool_hdl->libzfs_fd, ZFS_IOC_POOL_STATS, in zpool_refresh_stats()
297 zhp->zpool_state = POOL_STATE_UNAVAIL; in zpool_refresh_stats()
309 zhp->zpool_config_size = zc.zc_nvlist_dst_size; in zpool_refresh_stats()
311 if (zhp->zpool_config != NULL) { in zpool_refresh_stats()
314 verify(nvlist_lookup_uint64(zhp->zpool_config, in zpool_refresh_stats()
319 if (zhp->zpool_old_config != NULL) in zpool_refresh_stats()
320 nvlist_free(zhp->zpool_old_config); in zpool_refresh_stats()
323 nvlist_free(zhp->zpool_config); in zpool_refresh_stats()
324 zhp->zpool_old_config = NULL; in zpool_refresh_stats()
326 zhp->zpool_old_config = zhp->zpool_config; in zpool_refresh_stats()
330 zhp->zpool_config = config; in zpool_refresh_stats()
332 zhp->zpool_state = POOL_STATE_UNAVAIL; in zpool_refresh_stats()
334 zhp->zpool_state = POOL_STATE_ACTIVE; in zpool_refresh_stats()
388 zpool_handle_t *zhp; in zpool_iter() local
407 if (zpool_open_silent(hdl, cn->cn_name, &zhp) != 0) { in zpool_iter()
412 if (zhp == NULL) in zpool_iter()
415 if ((ret = func(zhp, data)) != 0) { in zpool_iter()
433 zfs_handle_t *zhp; in zfs_iter_root() local
445 if ((zhp = make_dataset_handle(hdl, cn->cn_name)) == NULL) in zfs_iter_root()
448 if ((ret = func(zhp, data)) != 0) in zfs_iter_root()