Lines Matching defs:zhp
254 zfs_handle_t *zhp = NULL;
336 if ((zhp = zfs_open(g_zfs, bt.obe_root_ds, ZFS_TYPE_DATASET)) == NULL) {
348 if ((ret = be_rollback_check_callback(zhp, bt.obe_snap_name)) != 0) {
349 zhp = NULL;
354 if ((zhp = zfs_open(g_zfs, bt.obe_root_ds, ZFS_TYPE_DATASET)) == NULL) {
366 if ((ret = be_rollback_callback(zhp, bt.obe_snap_name)) != 0) {
367 zhp = NULL;
373 zhp = NULL;
404 zfs_handle_t *zhp = NULL;
483 if ((zhp = zfs_open(g_zfs, bt.obe_root_ds, ZFS_TYPE_DATASET))
493 if (zfs_spa_version(zhp, &pool_version) != 0) {
495 "get ZFS pool version for %s: %s\n"), zfs_get_name(zhp),
607 ZFS_CLOSE(zhp);
630 zfs_handle_t *zhp;
669 zhp = zfs_open(g_zfs, bt.obe_root_ds, ZFS_TYPE_DATASET);
670 if (zhp == NULL) {
696 if (zfs_destroy_snaps(zhp, bt.obe_snap_name, B_FALSE) != 0) {
704 ZFS_CLOSE(zhp);
718 * zhp - zfs_handle_t pointer to filesystem being processed.
728 be_rollback_check_callback(zfs_handle_t *zhp, void *data)
735 (void) snprintf(ss, sizeof (ss), "%s@%s", zfs_get_name(zhp), snap_name);
741 ZFS_CLOSE(zhp);
746 if ((ret = zfs_iter_filesystems(zhp, be_rollback_check_callback,
748 ZFS_CLOSE(zhp);
752 ZFS_CLOSE(zhp);
761 * zhp - zfs_handle_t pointer to filesystem being processed.
770 be_rollback_callback(zfs_handle_t *zhp, void *data)
778 (void) snprintf(ss, sizeof (ss), "%s@%s", zfs_get_name(zhp), snap_name);
783 "failed to open snapshot %s: %s\n"), zfs_get_name(zhp),
786 ZFS_CLOSE(zhp);
791 if (zfs_rollback(zhp, zhp_snap, B_FALSE) != 0) {
794 zfs_get_name(zhp), ss, libzfs_error_description(g_zfs));
797 ZFS_CLOSE(zhp);
803 if ((ret = zfs_iter_filesystems(zhp, be_rollback_callback,
805 ZFS_CLOSE(zhp);
809 ZFS_CLOSE(zhp);