Lines Matching refs:g_zfs
51 libzfs_handle_t *g_zfs = NULL;
239 if ((zlp = zpool_open(g_zfs, bt.nbe_zpool)) == NULL) {
242 libzfs_error_description(g_zfs));
243 return (zfs_err_to_be_err(g_zfs));
257 if ((zret = zpool_iter(g_zfs, be_exists_callback, bt.nbe_name))
298 "%s\n"), libzfs_error_description(g_zfs));
299 return (zfs_err_to_be_err(g_zfs));
306 if (!zfs_dataset_exists(g_zfs, bt.nbe_zpool,
330 if (zfs_dataset_exists(g_zfs, nbe_root_ds,
484 if (zfs_create(g_zfs, nbe_root_ds, ZFS_TYPE_FILESYSTEM,
488 libzfs_error_description(g_zfs));
489 ret = zfs_err_to_be_err(g_zfs);
505 if ((zhp = zfs_open(g_zfs, bt.nbe_zpool, ZFS_TYPE_FILESYSTEM))
509 bt.nbe_zpool, libzfs_error_description(g_zfs));
510 ret = zfs_err_to_be_err(g_zfs);
518 "dataset: %s\n"), libzfs_error_description(g_zfs));
519 ret = zfs_err_to_be_err(g_zfs);
589 if (zfs_create(g_zfs, child_fs, ZFS_TYPE_FILESYSTEM, props)
593 libzfs_error_description(g_zfs));
594 ret = zfs_err_to_be_err(g_zfs);
698 if (zfs_dataset_exists(g_zfs, child_fs,
704 if (zfs_create(g_zfs, child_fs, ZFS_TYPE_FILESYSTEM,
708 child_fs, libzfs_error_description(g_zfs));
709 ret = zfs_err_to_be_err(g_zfs);
817 if ((zret = zpool_iter(g_zfs, be_find_zpool_callback, &bt)) == 0) {
823 libzfs_error_description(g_zfs));
824 return (zfs_err_to_be_err(g_zfs));
833 if ((zhp = zfs_open(g_zfs, bt.obe_root_ds, ZFS_TYPE_FILESYSTEM)) ==
837 libzfs_error_description(g_zfs));
838 return (zfs_err_to_be_err(g_zfs));
1029 if ((zret = zpool_iter(g_zfs, be_find_zpool_callback, &bt)) == 0) {
1036 libzfs_error_description(g_zfs));
1037 return (zfs_err_to_be_err(g_zfs));
1154 if ((zret = zpool_iter(g_zfs, be_exists_callback,
1163 libzfs_error_description(g_zfs));
1164 ret = zfs_err_to_be_err(g_zfs);
1176 if (zfs_dataset_exists(g_zfs, be_root_ds,
1237 if (!zfs_dataset_exists(g_zfs, ss, ZFS_TYPE_SNAPSHOT)) {
1240 libzfs_error_description(g_zfs));
1266 if ((zhp = zfs_open(g_zfs, bt.obe_root_ds, ZFS_TYPE_FILESYSTEM))
1270 libzfs_error_description(g_zfs));
1271 ret = zfs_err_to_be_err(g_zfs);
1279 bt.obe_name, libzfs_error_description(g_zfs));
1280 ret = zfs_err_to_be_err(g_zfs);
1338 if ((zhp = zfs_open(g_zfs, bt.obe_root_ds,
1343 libzfs_error_description(g_zfs));
1344 ret = zfs_err_to_be_err(g_zfs);
1516 if ((zhp = zfs_open(g_zfs, bt.nbe_root_ds,
1520 libzfs_error_description(g_zfs));
1521 ret = zfs_err_to_be_err(g_zfs);
1536 libzfs_error_description(g_zfs));
1537 ret = zfs_err_to_be_err(g_zfs);
1623 if (!g_zfs) {
1630 zret = zpool_iter(g_zfs, be_find_zpool_callback, &bt);
1632 *zerr = libzfs_errno(g_zfs);
1633 *zerrdesc = (char *)libzfs_error_description(g_zfs);
1641 return (zfs_err_to_be_err(g_zfs));
1706 if (zfs_dataset_exists(g_zfs, be_root_ds, ZFS_TYPE_FILESYSTEM)) {
1745 if (zfs_dataset_exists(g_zfs, be_root_ds, ZFS_TYPE_FILESYSTEM)) {
1789 if ((zhp = zfs_open(g_zfs, root_ds, ZFS_TYPE_FILESYSTEM)) == NULL) {
1792 libzfs_error_description(g_zfs));
1793 return (zfs_err_to_be_err(g_zfs));
1800 libzfs_error_description(g_zfs));
1801 ret = zfs_err_to_be_err(g_zfs);
1834 if ((zhp = zfs_open(g_zfs, root_ds, ZFS_TYPE_FILESYSTEM)) == NULL) {
1837 libzfs_error_description(g_zfs));
1838 return (zfs_err_to_be_err(g_zfs));
1845 root_ds, libzfs_error_description(g_zfs));
1846 ret = zfs_err_to_be_err(g_zfs);
1911 if ((zhp = zfs_open(g_zfs, root_ds, ZFS_TYPE_FILESYSTEM)) ==
1915 libzfs_error_description(g_zfs));
1916 return (zfs_err_to_be_err(g_zfs));
1931 if ((zhp = zfs_open(g_zfs, root_ds, ZFS_TYPE_FILESYSTEM)) ==
1935 libzfs_error_description(g_zfs));
1936 return (zfs_err_to_be_err(g_zfs));
1959 if ((snapzhp = zfs_open(g_zfs, origin, ZFS_TYPE_SNAPSHOT)) ==
1998 if ((zhp = zfs_open(g_zfs, origin, ZFS_TYPE_SNAPSHOT)) ==
2002 libzfs_error_description(g_zfs));
2003 ret = zfs_err_to_be_err(g_zfs);
2015 if ((zhp = zfs_open(g_zfs, parent, ZFS_TYPE_FILESYSTEM)) ==
2019 libzfs_error_description(g_zfs));
2020 ret = zfs_err_to_be_err(g_zfs);
2036 "BE: %s\n"), libzfs_error_description(g_zfs));
2047 if (libzfs_errno(g_zfs) != EZFS_EXISTS) {
2048 ret = zfs_err_to_be_err(g_zfs);
2105 if ((zhp = zfs_open(g_zfs, be_root_ds, ZFS_TYPE_FILESYSTEM)) ==
2109 libzfs_error_description(g_zfs));
2111 return (zfs_err_to_be_err(g_zfs));
2228 if ((zhp = zfs_open(g_zfs, zone_container_ds, ZFS_TYPE_FILESYSTEM))
2232 zone_container_ds, libzfs_error_description(g_zfs));
2233 return (zfs_err_to_be_err(g_zfs));
2244 zonepath_ds, libzfs_error_description(g_zfs));
2251 if ((zhp = zfs_open(g_zfs, zone_container_ds, ZFS_TYPE_FILESYSTEM))
2255 zone_container_ds, libzfs_error_description(g_zfs));
2256 return (zfs_err_to_be_err(g_zfs));
2270 zone_container_ds, libzfs_error_description(g_zfs));
2276 if ((zhp = zfs_open(g_zfs, zonepath_ds, ZFS_TYPE_FILESYSTEM))
2280 zonepath_ds, libzfs_error_description(g_zfs));
2289 zonepath_ds, libzfs_error_description(g_zfs));
2403 if ((obe_zhp = zfs_open(g_zfs, obe_root_ds, ZFS_TYPE_FILESYSTEM))
2407 "%s\n"), obe_root_ds, libzfs_error_description(g_zfs));
2408 return (zfs_err_to_be_err(g_zfs));
2412 if ((nbe_zhp = zfs_open(g_zfs, nbe_root_ds, ZFS_TYPE_FILESYSTEM))
2416 libzfs_error_description(g_zfs));
2418 return (zfs_err_to_be_err(g_zfs));
2500 if ((z_zhp = zfs_open(g_zfs, zoneroot_ds,
2504 zoneroot_ds, libzfs_error_description(g_zfs));
2505 ret = zfs_err_to_be_err(g_zfs);
2530 if (zfs_snapshot(g_zfs, ss, B_TRUE, NULL) != 0) {
2533 ss, libzfs_error_description(g_zfs));
2534 if (libzfs_errno(g_zfs) == EZFS_EXISTS)
2537 ret = zfs_err_to_be_err(g_zfs);
2613 if ((z_zhp = zfs_open(g_zfs, zoneroot_ds,
2619 libzfs_error_description(g_zfs));
2620 ret = zfs_err_to_be_err(g_zfs);
2669 if ((z_zhp = zfs_open(g_zfs, new_zoneroot_ds,
2674 libzfs_error_description(g_zfs));
2675 ret = zfs_err_to_be_err(g_zfs);
2684 ret = zfs_err_to_be_err(g_zfs);
2692 ret = zfs_err_to_be_err(g_zfs);
2760 if ((zhp_ss = zfs_open(g_zfs, ss, ZFS_TYPE_SNAPSHOT)) == NULL) {
2763 libzfs_error_description(g_zfs));
2764 ret = zfs_err_to_be_err(g_zfs);
2775 clone_ds, libzfs_error_description(g_zfs));
2780 return (zfs_err_to_be_err(g_zfs));
2798 if ((d_zhp = zfs_open(g_zfs, clone_ds, ZFS_TYPE_FILESYSTEM))
2855 if (zfs_create(g_zfs, clone_ds, ZFS_TYPE_FILESYSTEM, bt->nbe_zfs_props)
2859 clone_ds, libzfs_error_description(g_zfs));
2860 ret = zfs_err_to_be_err(g_zfs);
2908 if (zfs_receive(g_zfs, clone_ds, flags, NULL, srpipe[0], NULL,
2944 if ((d_zhp = zfs_open(g_zfs, clone_ds, ZFS_TYPE_FILESYSTEM))
3003 libzfs_error_description(g_zfs));
3004 ret = zfs_err_to_be_err(g_zfs);
3013 libzfs_error_description(g_zfs));
3014 ret = zfs_err_to_be_err(g_zfs);
3070 zfs_get_name(zhp), libzfs_error_description(g_zfs));
3071 ret = zfs_err_to_be_err(g_zfs);
3081 libzfs_error_description(g_zfs));
3082 ret = zfs_err_to_be_err(g_zfs);
3227 if ((zpool_iter(g_zfs, be_check_be_roots_callback,
3310 if (!zfs_dataset_exists(g_zfs, be_container_ds, ZFS_TYPE_FILESYSTEM)) {
3335 if (zfs_create(g_zfs, be_container_ds, ZFS_TYPE_FILESYSTEM,
3339 be_container_ds, libzfs_error_description(g_zfs));
3418 zhp_name, libzfs_error_description(g_zfs));
3419 return (zfs_err_to_be_err(g_zfs));