| /f-stack/freebsd/contrib/openzfs/lib/libzfs/ |
| H A D | libzfs_mount.c | 240 return (is_mounted(zhp->zfs_hdl, zfs_get_name(zhp), where)); in zfs_is_mounted() 534 zhp->zfs_name)); in zfs_mount_at() 600 (void) zfs_shareall(zhp); in zfs_unmount() 664 if (ZFS_IS_VOLUME(zhp)) in zfs_is_shared() 1056 zfs_close(zhp); in zfs_iter_cb() 1061 zfs_close(zhp); in zfs_iter_cb() 1067 zfs_close(zhp); in zfs_iter_cb() 1078 zfs_close(zhp); in zfs_iter_cb() 1084 zfs_close(zhp); in zfs_iter_cb() 1283 if (zfs_share(zhp) != 0) in zfs_share_one() [all …]
|
| H A D | libzfs_dataset.c | 471 if ((zhp->zpool_hdl = zpool_handle(zhp)) == NULL) in make_dataset_handle_common() 490 free(zhp); in make_dataset_handle() 535 zhp->zpool_hdl = zpool_handle(zhp); in make_dataset_simple_handle_zc() 641 if ((zhp->zpool_hdl = zpool_handle(zhp)) == NULL) { in make_bookmark_handle() 667 dp->zhp = zhp; in zfs_open_bookmarks_cb() 752 zhp = cb_data.zhp; in zfs_open() 780 free(zhp); in zfs_close() 1764 zfs_prop_get_int(zhp, ZFS_PROP_ZONED), zhp, zhp->zpool_hdl, in zfs_prop_set_list() 2082 return (zhp->zfs_props == zhp->zfs_recvd_props); in zfs_is_recvd_props_mode() 2089 zhp->zfs_props = zhp->zfs_recvd_props; in zfs_set_recvd_props_mode() [all …]
|
| H A D | libzfs_iter.c | 270 search.zn_handle = zhp; in zfs_sort_snaps() 285 node->zn_handle = zhp; in zfs_sort_snaps() 362 zfs_close(zhp); in snapspec_cb() 473 zfs_handle_t *zhp; member 506 zfs_close(zhp); in iter_dependents_cb() 509 zfs_error_aux(zhp->zfs_hdl, in iter_dependents_cb() 512 zfs_get_name(zhp)); in iter_dependents_cb() 513 err = zfs_error(zhp->zfs_hdl, in iter_dependents_cb() 518 zfs_close(zhp); in iter_dependents_cb() 524 isf.zhp = zhp; in iter_dependents_cb() [all …]
|
| H A D | libzfs_crypto.c | 669 const char *fsname = (zhp) ? zfs_get_name(zhp) : NULL; in populate_create_encryption_params_nvlists() 1039 zfs_close(zhp); in load_keys_cb() 1057 if (zhp == NULL) { in zfs_crypto_attempt_load_keys() 1075 zfs_close(zhp); in zfs_crypto_attempt_load_keys() 1079 if (zhp != NULL) in zfs_crypto_attempt_load_keys() 1080 zfs_close(zhp); in zfs_crypto_attempt_load_keys() 1126 zfs_get_name(zhp)); in zfs_crypto_load_key() 1289 zfs_get_name(zhp)); in zfs_crypto_unload_key() 1371 new_props = zfs_valid_proplist(zhp->zfs_hdl, zhp->zfs_type, props, in zfs_crypto_verify_rewrap_nvlist() 1372 zfs_prop_get_int(zhp, ZFS_PROP_ZONED), NULL, zhp->zpool_hdl, in zfs_crypto_verify_rewrap_nvlist() [all …]
|
| H A D | libzfs_pool.c | 148 if (zhp->zpool_props == NULL && zpool_get_all_props(zhp)) { in zpool_get_prop_int() 323 if (zhp->zpool_props == NULL && zpool_get_all_props(zhp) && in zpool_get_prop() 1065 (void) strlcpy(zhp->zpool_name, pool, sizeof (zhp->zpool_name)); in zpool_open_canfail() 1080 return (zhp); in zpool_open_canfail() 1097 (void) strlcpy(zhp->zpool_name, pool, sizeof (zhp->zpool_name)); in zpool_open_silent() 1110 *ret = zhp; in zpool_open_silent() 1133 return (zhp); in zpool_open() 1145 free(zhp); in zpool_close() 1603 zhp->zpool_name, zhp->zpool_name); in zpool_export_common() 3404 char *mpath = zpool_vdev_name(zhp->zpool_hdl, zhp, in find_vdev_entry() [all …]
|
| H A D | libzfs_config.c | 223 *oldconfig = zhp->zpool_old_config; in zpool_get_config() 224 return (zhp->zpool_config); in zpool_get_config() 275 if (zhp->zpool_config_size == 0) in zpool_refresh_stats() 276 zhp->zpool_config_size = 1 << 16; in zpool_refresh_stats() 314 if (zhp->zpool_config != NULL) { in zpool_refresh_stats() 317 zhp->zpool_old_config = zhp->zpool_config; in zpool_refresh_stats() 320 zhp->zpool_config = config; in zpool_refresh_stats() 392 zpool_handle_t *zhp; in zpool_iter() local 416 if (zhp == NULL) in zpool_iter() 437 zfs_handle_t *zhp; in zfs_iter_root() local [all …]
|
| H A D | libzfs_sendrecv.c | 310 zfs_close(zhp); in send_iterate_snap() 326 zfs_close(zhp); in send_iterate_snap() 331 zfs_close(zhp); in send_iterate_snap() 353 zfs_close(zhp); in send_iterate_snap() 641 zfs_close(zhp); in send_iterate_fs() 656 if (zhp == NULL) in gather_nvlist() 1091 if (zfs_send_space(zhp, zhp->zfs_name, in dump_snapshot() 1142 zfs_close(zhp); in dump_snapshot() 1195 min_txg = get_snap_txg(zhp->zfs_hdl, zhp->zfs_name, in dump_filesystem() 1198 max_txg = get_snap_txg(zhp->zfs_hdl, zhp->zfs_name, in dump_filesystem() [all …]
|
| H A D | libzfs_changelist.c | 450 if ((cn = zfs_alloc(zfs_get_handle(zhp), in changelist_add_mounted() 452 zfs_close(zhp); in changelist_add_mounted() 456 cn->cn_handle = zhp; in changelist_add_mounted() 459 cn->cn_shared = zfs_is_shared(zhp); in changelist_add_mounted() 473 zfs_close(zhp); in changelist_add_mounted() 531 cn->cn_handle = zhp; in change_one() 533 zfs_is_mounted(zhp, NULL); in change_one() 534 cn->cn_shared = zfs_is_shared(zhp); in change_one() 565 zfs_close(zhp); in change_one() 737 if ((temp = zfs_open(zhp->zfs_hdl, zfs_get_name(zhp), in changelist_gather() [all …]
|
| H A D | libzfs_diff.c | 472 libzfs_handle_t *hdl = di->zhp->zfs_hdl; in make_temp_snapshot() 518 libzfs_handle_t *hdl = di->zhp->zfs_hdl; in get_snapshot_names() 579 zfs_handle_t *zhp; in get_snapshot_names() local 586 while (zhp != NULL) { in get_snapshot_names() 589 (void) zfs_close(zhp); in get_snapshot_names() 590 zhp = NULL; in get_snapshot_names() 596 (void) zfs_close(zhp); in get_snapshot_names() 600 if (zhp == NULL) { in get_snapshot_names() 606 (void) zfs_close(zhp); in get_snapshot_names() 698 di->zhp = zhp; in setup_differ_info() [all …]
|
| H A D | libzfs_import.c | 50 zpool_handle_t *zhp; in pool_active() local 53 if (zpool_open_silent(hdl, name, &zhp) != 0) in pool_active() 56 if (zhp == NULL) { in pool_active() 64 zpool_close(zhp); in pool_active() 267 find_aux(zpool_handle_t *zhp, void *data) in find_aux() argument 284 cbp->cb_zhp = zhp; in find_aux() 290 zpool_close(zhp); in find_aux() 307 zpool_handle_t *zhp; in zpool_in_use() local 352 zpool_close(zhp); in zpool_in_use() 402 if (zhp != NULL) in zpool_in_use() [all …]
|
| /f-stack/freebsd/contrib/openzfs/cmd/zed/agents/ |
| H A D | zfs_retire.c | 86 cbp->cb_zhp = zhp; in find_pool() 90 zpool_close(zhp); in find_pool() 150 zpool_handle_t *zhp; in find_by_guid() local 160 zhp = cb.cb_zhp; in find_by_guid() 164 zpool_close(zhp); in find_by_guid() 170 zpool_close(zhp); in find_by_guid() 175 return (zhp); in find_by_guid() 365 zpool_close(zhp); in zfs_retire_recv() 474 zpool_close(zhp); in zfs_retire_recv() 487 zpool_close(zhp); in zfs_retire_recv() [all …]
|
| H A D | zfs_mod.c | 131 zpool_get_name(zhp), (int)zfs_toplevel_state(zhp)); in zfs_unavail_pool() 136 uap->uap_zhp = zhp; in zfs_unavail_pool() 139 zpool_close(zhp); in zfs_unavail_pool() 572 zfs_iter_vdev(zhp, nvl, data); in zfs_iter_pool() 584 if (strcmp(zpool_get_name(zhp), in zfs_iter_pool() 596 zpool_close(zhp); in zfs_iter_pool() 740 zpool_close(zhp); in zfsdle_vdev_online() 754 zpool_close(zhp); in zfsdle_vdev_online() 758 zpool_close(zhp); in zfsdle_vdev_online() 789 zpool_close(zhp); in zfsdle_vdev_online() [all …]
|
| H A D | zfs_agents.c | 76 zfs_agent_iter_vdev(zpool_handle_t *zhp, nvlist_t *nvl, void *arg) in zfs_agent_iter_vdev() argument 89 if (zfs_agent_iter_vdev(zhp, child[c], gsp)) { in zfs_agent_iter_vdev() 101 if (zfs_agent_iter_vdev(zhp, child[c], gsp)) { in zfs_agent_iter_vdev() 110 if (zfs_agent_iter_vdev(zhp, child[c], gsp)) { in zfs_agent_iter_vdev() 133 zfs_agent_iter_pool(zpool_handle_t *zhp, void *arg) in zfs_agent_iter_pool() argument 141 if ((config = zpool_get_config(zhp, NULL)) != NULL) { in zfs_agent_iter_pool() 144 (void) zfs_agent_iter_vdev(zhp, nvl, gsp); in zfs_agent_iter_pool() 155 zpool_close(zhp); in zfs_agent_iter_pool()
|
| /f-stack/freebsd/contrib/openzfs/cmd/zfs/ |
| H A D | zfs_main.c | 740 if (zhp == NULL) in zfs_mount_and_share() 748 zfs_close(zhp); in zfs_mount_and_share() 779 zfs_close(zhp); in zfs_mount_and_share() 883 zfs_close(zhp); in zfs_do_clone() 1387 zfs_close(zhp); in destroy_check_dependent() 1464 zfs_close(zhp); in destroy_callback() 1506 zfs_close(zhp); in destroy_print_cb() 1550 zfs_close(zhp); in snapshot_to_nvl_cb() 1576 zfs_close(zhp); in gather_snapshots() 1831 zhp = NULL; in zfs_do_destroy() [all …]
|
| H A D | zfs_iter.c | 84 zph = zfs_get_pool_handle(zhp); in zfs_include_snapshots() 93 zfs_callback(zfs_handle_t *zhp, void *data) in zfs_callback() argument 100 if ((zfs_get_type(zhp) & cb->cb_types) || in zfs_callback() 105 node->zn_handle = zhp; in zfs_callback() 112 zfs_prune_proplist(zhp, in zfs_callback() 152 (void) zfs_iter_snapshots(zhp, in zfs_callback() 166 zfs_close(zhp); in zfs_callback() 458 zfs_handle_t *zhp; in zfs_for_each() local 478 zhp = zfs_open(g_zfs, argv[i], argtype); in zfs_for_each() 480 if (zhp != NULL) in zfs_for_each() [all …]
|
| /f-stack/freebsd/contrib/openzfs/cmd/zpool/ |
| H A D | zpool_main.c | 625 if (zhp == NULL) in zpool_do_initialize() 647 zpool_close(zhp); in zpool_do_initialize() 951 zpool_close(zhp); in zpool_do_add() 973 zpool_close(zhp); in zpool_do_add() 1080 zpool_close(zhp); in zpool_do_add() 1190 zpool_close(zhp); in zpool_do_remove() 1761 zpool_close(zhp); in zpool_do_destroy() 1947 zpool_close(zhp); in find_spare() 7234 if (zhp == NULL) in zpool_do_trim() 8343 print_status_config(zhp, cbp, zpool_get_name(zhp), nvroot, 0, in status_callback() [all …]
|
| H A D | zpool_iter.c | 82 add_pool(zpool_handle_t *zhp, void *data) in add_pool() argument 88 node->zn_handle = zhp; in add_pool() 92 zpool_expand_proplist(zhp, zlp->zl_proplist, in add_pool() 95 zpool_close(zhp); in add_pool() 101 zpool_close(zhp); in add_pool() 144 zpool_handle_t *zhp; in pool_list_get() local 148 if (add_pool(zhp, zlp) != 0) in pool_list_get() 200 search.zn_handle = zhp; in pool_list_remove() 295 ret |= for_each_vdev_cb(zhp, child[c], func, in for_each_vdev_cb() 306 ret |= func(zhp, nv, data); in for_each_vdev_cb() [all …]
|
| H A D | zpool_util.h | 57 nvlist_t *make_root_vdev(zpool_handle_t *zhp, nvlist_t *props, int force, 60 nvlist_t *split_mirror_vdev(zpool_handle_t *zhp, char *newname, 71 int for_each_vdev(zpool_handle_t *zhp, pool_vdev_iter_f func, void *data);
|
| /f-stack/freebsd/contrib/openzfs/cmd/zinject/ |
| H A D | translate.c | 135 zfs_handle_t *zhp; in object_from_path() local 137 if ((zhp = zfs_open(g_zfs, dataset, ZFS_TYPE_DATASET)) == NULL) in object_from_path() 140 record->zi_objset = zfs_prop_get_int(zhp, ZFS_PROP_OBJSETID); in object_from_path() 143 zfs_close(zhp); in object_from_path() 335 zpool_handle_t *zhp; in translate_device() local 343 if ((zhp = zpool_open(g_zfs, pool)) == NULL) in translate_device() 348 tgt = zpool_find_vdev(zhp, device, &isspare, &iscache, NULL); in translate_device() 353 zpool_close(zhp); in translate_device() 395 zpool_close(zhp); in translate_device()
|
| /f-stack/freebsd/contrib/openzfs/lib/libzfs/os/freebsd/ |
| H A D | libzfs_compat.c | 236 zpool_label_disk(libzfs_handle_t *hdl, zpool_handle_t *zhp, const char *name) in zpool_label_disk() argument 251 zfs_jail(zfs_handle_t *zhp, int jailid, int attach) in zfs_jail() argument 253 libzfs_handle_t *hdl = zhp->zfs_hdl; in zfs_jail() 261 dgettext(TEXT_DOMAIN, "cannot jail '%s'"), zhp->zfs_name); in zfs_jail() 264 dgettext(TEXT_DOMAIN, "cannot unjail '%s'"), zhp->zfs_name); in zfs_jail() 267 switch (zhp->zfs_type) { in zfs_jail() 285 assert(zhp->zfs_type == ZFS_TYPE_FILESYSTEM); in zfs_jail() 287 (void) strlcpy(zc.zc_name, zhp->zfs_name, sizeof (zc.zc_name)); in zfs_jail()
|
| /f-stack/freebsd/contrib/openzfs/tests/zfs-tests/cmd/badsend/ |
| H A D | badsend.c | 57 zfs_handle_t *zhp; in main() local 90 zhp = zfs_open(zhdl, fsname, ZFS_TYPE_FILESYSTEM); in main() 91 if (zhp == NULL) in main() 98 error = zfs_send(zhp, tosnap, fromsnap, &flags, fd, NULL, NULL, NULL); in main() 106 zfs_close(zhp); in main()
|
| /f-stack/freebsd/contrib/openzfs/lib/libzfs/os/linux/ |
| H A D | libzfs_mount_os.c | 260 zfs_selinux_setcontext(zfs_handle_t *zhp, zfs_prop_t zpt, const char *name, in zfs_selinux_setcontext() argument 265 if (zfs_prop_get(zhp, zpt, context, sizeof (context), in zfs_selinux_setcontext() 273 zfs_adjust_mount_options(zfs_handle_t *zhp, const char *mntpoint, in zfs_adjust_mount_options() argument 286 if (zfs_prop_get(zhp, ZFS_PROP_SELINUX_CONTEXT, prop, sizeof (prop), in zfs_adjust_mount_options() 289 zfs_selinux_setcontext(zhp, ZFS_PROP_SELINUX_FSCONTEXT, in zfs_adjust_mount_options() 291 zfs_selinux_setcontext(zhp, ZFS_PROP_SELINUX_DEFCONTEXT, in zfs_adjust_mount_options() 293 zfs_selinux_setcontext(zhp, in zfs_adjust_mount_options() 323 do_mount(zfs_handle_t *zhp, const char *mntpt, char *opts, int flags) in do_mount() argument 325 const char *src = zfs_get_name(zhp); in do_mount() 338 zfs_adjust_mount_options(zhp, mntpt, myopts, NULL); in do_mount()
|
| H A D | libzfs_pool_os.c | 212 zpool_label_disk(libzfs_handle_t *hdl, zpool_handle_t *zhp, const char *name) in zpool_label_disk() argument 226 if (zhp) { in zpool_label_disk() 229 verify(nvlist_lookup_nvlist(zhp->zpool_config, in zpool_label_disk() 232 if (zhp->zpool_start_block == 0) in zpool_label_disk() 235 start_block = zhp->zpool_start_block; in zpool_label_disk() 236 zhp->zpool_start_block = start_block; in zpool_label_disk()
|
| /f-stack/freebsd/contrib/openzfs/cmd/mount_zfs/ |
| H A D | mount_zfs.c | 135 zfs_handle_t *zhp; in main() local 254 if ((zhp = zfs_open(g_zfs, dataset, in main() 262 zfs_adjust_mount_options(zhp, mntpoint, mntopts, mtabopt); in main() 265 if (zfs_get_type(zhp) == ZFS_TYPE_SNAPSHOT) in main() 268 (void) zfs_prop_get(zhp, ZFS_PROP_MOUNTPOINT, prop, in main() 276 zfs_version = zfs_prop_get_int(zhp, ZFS_PROP_VERSION); in main() 283 zfs_close(zhp); in main()
|
| /f-stack/freebsd/contrib/openzfs/include/ |
| H A D | libzfs_impl.h | 96 #define ZFS_IS_VOLUME(zhp) ((zhp)->zfs_head_type == ZFS_TYPE_VOLUME) argument 222 zfs_handle_t *zhp; member 244 extern int do_mount(zfs_handle_t *zhp, const char *mntpt, char *opts, 248 extern int zfs_share_proto(zfs_handle_t *zhp, zfs_share_proto_t *proto); 251 extern boolean_t zfs_is_mountable(zfs_handle_t *zhp, char *buf, size_t buflen,
|