Lines Matching defs:zhp

220 	zfs_handle_t	*zhp = NULL;
299 if ((zhp = zfs_open(g_zfs, root_ds, ZFS_TYPE_FILESYSTEM)) != NULL) {
305 if (be_promote_ds_callback(zhp, NULL) != 0) {
339 if ((zhp = zfs_open(g_zfs, root_ds,
348 if ((ret = be_find_active_zone_root(zhp, cb.obe_zpool,
352 ZFS_CLOSE(zhp);
358 ZFS_CLOSE(zhp);
363 if (zfs_prop_set(zhp, BE_ZONE_ACTIVE_PROPERTY, "on") != 0) {
368 ZFS_CLOSE(zhp);
371 ZFS_CLOSE(zhp);
374 if ((zhp = zfs_open(g_zfs, active_ds,
382 if (zfs_prop_set(zhp, BE_ZONE_ACTIVE_PROPERTY, "off") != 0) {
387 ZFS_CLOSE(zhp);
390 ZFS_CLOSE(zhp);
487 zpool_handle_t *zhp;
490 if ((zhp = zpool_open(g_zfs, boot_rpool)) == NULL) {
497 err = zpool_set_prop(zhp, "bootfs", be_root_ds);
503 zpool_close(zhp);
507 zpool_close(zhp);
528 zfs_handle_t *zhp = NULL;
538 if ((zhp = zfs_open(g_zfs, ds_path, ZFS_TYPE_DATASET)) ==
546 if (zfs_prop_get_int(zhp, ZFS_PROP_MOUNTED)) {
553 err = zfs_prop_set(zhp,
556 ZFS_CLOSE(zhp);
564 ZFS_CLOSE(zhp);
571 if ((zhp = zfs_open(g_zfs, ds_path, ZFS_TYPE_DATASET))
579 if (zfs_prop_get_int(zhp, ZFS_PROP_MOUNTED)) {
585 ZFS_CLOSE(zhp);
588 err = zfs_prop_set(zhp,
591 ZFS_CLOSE(zhp);
599 ZFS_CLOSE(zhp);
627 zfs_handle_t *zhp = NULL;
691 if ((zhp = zfs_open(g_zfs, bt->obe_root_ds, ZFS_TYPE_FILESYSTEM)) ==
700 if (!zfs_is_mounted(zhp, &temp_mntpnt)) {
707 ZFS_CLOSE(zhp);
712 ZFS_CLOSE(zhp);
1019 zfs_handle_t *zhp = NULL;
1037 if ((zhp = zfs_open(g_zfs, bt->obe_root_ds, ZFS_TYPE_FILESYSTEM)) ==
1045 if (!zfs_is_mounted(zhp, &tmp_mntpnt)) {
1050 ZFS_CLOSE(zhp);
1055 ZFS_CLOSE(zhp); /* BE dataset handle is not needed any more */
1062 zhp = zfs_open(g_zfs, bt->obe_zpool, ZFS_TYPE_FILESYSTEM);
1063 if (zhp == NULL) {
1074 if ((ret = be_mount_pool(zhp, &tmp_mntpnt,
1078 ZFS_CLOSE(zhp);
1084 * NOTE: zhp must be kept for _be_unmount_pool()
1086 if (!zfs_is_mounted(zhp, &pool_mntpnt)) {
1126 err = be_unmount_pool(zhp, tmp_mntpnt, orig_mntpnt);
1131 zfs_close(zhp);
1218 zfs_handle_t *zhp = NULL;
1242 if ((zhp = zfs_open(g_zfs, bt->obe_root_ds, ZFS_TYPE_FILESYSTEM)) ==
1250 if (!zfs_is_mounted(zhp, &tmp_mntpt)) {
1255 ZFS_CLOSE(zhp);
1260 ZFS_CLOSE(zhp);
1399 ZFS_CLOSE(zhp);
1431 zfs_handle_t *zhp = NULL;
1451 if ((zhp = zfs_open(g_zfs, be_root_ds,
1461 if (!zfs_is_mounted(zhp, &temp_mntpt)) {
1466 ZFS_CLOSE(zhp);
1485 ZFS_CLOSE(zhp);
1505 if (be_find_active_zone_root(zhp, zone_ds,
1547 ZFS_CLOSE(zhp);
1561 * zhp - the zfs handle for zone BE being activated.
1572 be_promote_ds_callback(zfs_handle_t *zhp, void *data)
1578 if (zhp != NULL) {
1579 sub_dataset = strdup(zfs_get_name(zhp));
1597 while (zfs_prop_get(zhp, ZFS_PROP_ORIGIN, origin,
1599 if (zfs_promote(zhp) != 0) {
1603 zfs_get_name(zhp),
1623 "name collision: %s\n"), zfs_get_name(zhp),
1629 ZFS_CLOSE(zhp);
1630 if ((zhp = zfs_open(g_zfs, sub_dataset,
1641 ret = zfs_iter_filesystems(zhp, be_promote_ds_callback, NULL);
1645 ZFS_CLOSE(zhp);