Lines Matching defs:g_zfs

54 libzfs_handle_t *g_zfs = NULL;
178 if ((zlp = zpool_open(g_zfs, bt.nbe_zpool)) == NULL) {
181 libzfs_error_description(g_zfs));
182 return (zfs_err_to_be_err(g_zfs));
196 if ((zret = zpool_iter(g_zfs, be_exists_callback, bt.nbe_name)) > 0) {
202 libzfs_error_description(g_zfs));
203 return (zfs_err_to_be_err(g_zfs));
265 if (zfs_create(g_zfs, nbe_root_ds, ZFS_TYPE_FILESYSTEM,
269 libzfs_error_description(g_zfs));
270 ret = zfs_err_to_be_err(g_zfs);
301 if (zfs_create(g_zfs, child_fs, ZFS_TYPE_FILESYSTEM,
305 libzfs_error_description(g_zfs));
306 ret = zfs_err_to_be_err(g_zfs);
337 if (zfs_dataset_exists(g_zfs, child_fs,
341 if (zfs_create(g_zfs, child_fs, ZFS_TYPE_FILESYSTEM,
345 child_fs, libzfs_error_description(g_zfs));
346 ret = zfs_err_to_be_err(g_zfs);
436 if ((zret = zpool_iter(g_zfs, be_find_zpool_callback, &bt)) == 0) {
442 libzfs_error_description(g_zfs));
443 return (zfs_err_to_be_err(g_zfs));
475 if ((zhp = zfs_open(g_zfs, bt.obe_root_ds, ZFS_TYPE_FILESYSTEM)) ==
479 libzfs_error_description(g_zfs));
480 return (zfs_err_to_be_err(g_zfs));
654 if ((zphp = zpool_open(g_zfs, bt.obe_zpool)) == NULL) {
657 libzfs_error_description(g_zfs));
658 return (zfs_err_to_be_err(g_zfs));
665 if ((zret = zpool_iter(g_zfs, be_find_zpool_callback, &bt)) ==
673 libzfs_error_description(g_zfs));
674 return (zfs_err_to_be_err(g_zfs));
771 if ((zret = zpool_iter(g_zfs, be_exists_callback,
780 libzfs_error_description(g_zfs));
781 ret = zfs_err_to_be_err(g_zfs);
787 if (zfs_dataset_exists(g_zfs, nbe_root_ds,
849 if (!zfs_dataset_exists(g_zfs, ss, ZFS_TYPE_SNAPSHOT)) {
852 libzfs_error_description(g_zfs));
878 if ((zhp = zfs_open(g_zfs, bt.obe_root_ds, ZFS_TYPE_FILESYSTEM))
882 libzfs_error_description(g_zfs));
883 ret = zfs_err_to_be_err(g_zfs);
891 bt.obe_name, libzfs_error_description(g_zfs));
892 ret = zfs_err_to_be_err(g_zfs);
950 if ((zhp = zfs_open(g_zfs, bt.obe_root_ds,
955 libzfs_error_description(g_zfs));
956 ret = zfs_err_to_be_err(g_zfs);
1130 if ((zhp = zfs_open(g_zfs, bt.nbe_root_ds,
1134 libzfs_error_description(g_zfs));
1135 ret = zfs_err_to_be_err(g_zfs);
1150 libzfs_error_description(g_zfs));
1151 ret = zfs_err_to_be_err(g_zfs);
1238 if (zfs_dataset_exists(g_zfs, be_root_ds, ZFS_TYPE_FILESYSTEM)) {
1277 if (zfs_dataset_exists(g_zfs, be_root_ds, ZFS_TYPE_FILESYSTEM)) {
1347 if ((zhp = zfs_open(g_zfs, root_ds, ZFS_TYPE_FILESYSTEM)) == NULL) {
1350 libzfs_error_description(g_zfs));
1351 return (zfs_err_to_be_err(g_zfs));
1358 libzfs_error_description(g_zfs));
1359 ret = zfs_err_to_be_err(g_zfs);
1392 if ((zhp = zfs_open(g_zfs, root_ds, ZFS_TYPE_FILESYSTEM)) == NULL) {
1395 libzfs_error_description(g_zfs));
1396 return (zfs_err_to_be_err(g_zfs));
1403 root_ds, libzfs_error_description(g_zfs));
1404 ret = zfs_err_to_be_err(g_zfs);
1467 if ((zhp = zfs_open(g_zfs, root_ds, ZFS_TYPE_FILESYSTEM)) ==
1471 libzfs_error_description(g_zfs));
1472 return (zfs_err_to_be_err(g_zfs));
1487 if ((zhp = zfs_open(g_zfs, root_ds, ZFS_TYPE_FILESYSTEM)) ==
1491 libzfs_error_description(g_zfs));
1492 return (zfs_err_to_be_err(g_zfs));
1519 ret = zfs_err_to_be_err(g_zfs);
1530 if ((zhp = zfs_open(g_zfs, origin, ZFS_TYPE_SNAPSHOT)) ==
1534 libzfs_error_description(g_zfs));
1535 ret = zfs_err_to_be_err(g_zfs);
1547 if ((zhp = zfs_open(g_zfs, parent, ZFS_TYPE_FILESYSTEM)) ==
1551 libzfs_error_description(g_zfs));
1552 ret = zfs_err_to_be_err(g_zfs);
1568 "BE: %s\n"), libzfs_error_description(g_zfs));
1579 if (libzfs_errno(g_zfs) != EZFS_EXISTS) {
1580 ret = zfs_err_to_be_err(g_zfs);
1637 if ((zhp = zfs_open(g_zfs, be_root_ds, ZFS_TYPE_FILESYSTEM)) ==
1641 libzfs_error_description(g_zfs));
1643 return (zfs_err_to_be_err(g_zfs));
1754 if ((zhp = zfs_open(g_zfs, zone_container_ds, ZFS_TYPE_FILESYSTEM))
1758 zone_container_ds, libzfs_error_description(g_zfs));
1759 return (zfs_err_to_be_err(g_zfs));
1770 zonepath_ds, libzfs_error_description(g_zfs));
1777 if ((zhp = zfs_open(g_zfs, zone_container_ds, ZFS_TYPE_FILESYSTEM))
1781 zone_container_ds, libzfs_error_description(g_zfs));
1782 return (zfs_err_to_be_err(g_zfs));
1796 zone_container_ds, libzfs_error_description(g_zfs));
1802 if ((zhp = zfs_open(g_zfs, zonepath_ds, ZFS_TYPE_FILESYSTEM))
1806 zonepath_ds, libzfs_error_description(g_zfs));
1815 zonepath_ds, libzfs_error_description(g_zfs));
1928 if ((obe_zhp = zfs_open(g_zfs, obe_root_ds, ZFS_TYPE_FILESYSTEM))
1932 "%s\n"), obe_root_ds, libzfs_error_description(g_zfs));
1933 return (zfs_err_to_be_err(g_zfs));
1937 if ((nbe_zhp = zfs_open(g_zfs, nbe_root_ds, ZFS_TYPE_FILESYSTEM))
1941 libzfs_error_description(g_zfs));
1943 return (zfs_err_to_be_err(g_zfs));
2023 if ((z_zhp = zfs_open(g_zfs, zoneroot_ds,
2027 zoneroot_ds, libzfs_error_description(g_zfs));
2028 ret = zfs_err_to_be_err(g_zfs);
2053 if (zfs_snapshot(g_zfs, ss, B_TRUE, NULL) != 0) {
2056 ss, libzfs_error_description(g_zfs));
2057 if (libzfs_errno(g_zfs) == EZFS_EXISTS)
2060 ret = zfs_err_to_be_err(g_zfs);
2133 if ((z_zhp = zfs_open(g_zfs, zoneroot_ds,
2139 libzfs_error_description(g_zfs));
2140 ret = zfs_err_to_be_err(g_zfs);
2185 if ((z_zhp = zfs_open(g_zfs, new_zoneroot_ds,
2190 libzfs_error_description(g_zfs));
2191 ret = zfs_err_to_be_err(g_zfs);
2200 ret = zfs_err_to_be_err(g_zfs);
2208 ret = zfs_err_to_be_err(g_zfs);
2287 zfs_get_name(zhp), libzfs_error_description(g_zfs));
2288 ret = zfs_err_to_be_err(g_zfs);
2326 if ((zhp_ss = zfs_open(g_zfs, ss, ZFS_TYPE_SNAPSHOT)) == NULL) {
2329 libzfs_error_description(g_zfs));
2330 ret = zfs_err_to_be_err(g_zfs);
2341 clone_ds, libzfs_error_description(g_zfs));
2346 return (zfs_err_to_be_err(g_zfs));
2365 if ((d_zhp = zfs_open(g_zfs, clone_ds, ZFS_TYPE_FILESYSTEM))
2422 if (zfs_create(g_zfs, clone_ds, ZFS_TYPE_FILESYSTEM, bt->nbe_zfs_props)
2426 clone_ds, libzfs_error_description(g_zfs));
2427 ret = zfs_err_to_be_err(g_zfs);
2475 if (zfs_receive(g_zfs, clone_ds, NULL, &flags, srpipe[0], NULL) != 0) {
2510 if ((d_zhp = zfs_open(g_zfs, clone_ds, ZFS_TYPE_FILESYSTEM))
2570 libzfs_error_description(g_zfs));
2571 ret = zfs_err_to_be_err(g_zfs);
2580 libzfs_error_description(g_zfs));
2581 ret = zfs_err_to_be_err(g_zfs);
2637 zfs_get_name(zhp), libzfs_error_description(g_zfs));
2638 ret = zfs_err_to_be_err(g_zfs);
2648 libzfs_error_description(g_zfs));
2649 ret = zfs_err_to_be_err(g_zfs);
2782 libzfs_error_description(g_zfs));
2792 if ((zpool_iter(g_zfs, be_check_be_roots_callback, ds_path))
2875 if (!zfs_dataset_exists(g_zfs, be_container_ds, ZFS_TYPE_FILESYSTEM)) {
2900 if (zfs_create(g_zfs, be_container_ds, ZFS_TYPE_FILESYSTEM,
2904 be_container_ds, libzfs_error_description(g_zfs));
2981 zhp_name, libzfs_error_description(g_zfs));
2982 return (zfs_err_to_be_err(g_zfs));