/titanic_50/usr/src/uts/common/fs/zfs/ |
H A D | zfs_ioctl.c | 240 static int zfs_ioc_userspace_upgrade(zfs_cmd_t *zc); 295 history_str_get(zfs_cmd_t *zc) in history_str_get() argument 299 if (zc->zc_history == NULL) in history_str_get() 303 if (copyinstr((void *)(uintptr_t)zc->zc_history, in history_str_get() 374 zfs_log_history(zfs_cmd_t *zc) in zfs_log_history() argument 379 if ((buf = history_str_get(zc)) == NULL) in zfs_log_history() 382 if (spa_open(zc->zc_name, &spa, FTAG) == 0) { in zfs_log_history() 396 zfs_secpolicy_none(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr) in zfs_secpolicy_none() argument 407 zfs_secpolicy_read(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr) in zfs_secpolicy_read() argument 410 zone_dataset_visible(zc->zc_name, NULL)) in zfs_secpolicy_read() [all …]
|
H A D | zap_micro.c | 1195 zap_cursor_init_serialized(zap_cursor_t *zc, objset_t *os, uint64_t zapobj, in zap_cursor_init_serialized() argument 1198 zc->zc_objset = os; in zap_cursor_init_serialized() 1199 zc->zc_zap = NULL; in zap_cursor_init_serialized() 1200 zc->zc_leaf = NULL; in zap_cursor_init_serialized() 1201 zc->zc_zapobj = zapobj; in zap_cursor_init_serialized() 1202 zc->zc_serialized = serialized; in zap_cursor_init_serialized() 1203 zc->zc_hash = 0; in zap_cursor_init_serialized() 1204 zc->zc_cd = 0; in zap_cursor_init_serialized() 1208 zap_cursor_init(zap_cursor_t *zc, objset_t *os, uint64_t zapobj) in zap_cursor_init() argument 1210 zap_cursor_init_serialized(zc, os, zapobj, 0); in zap_cursor_init() [all …]
|
H A D | zap.c | 969 zap_cursor_t zc; in zap_value_search() local 977 for (zap_cursor_init(&zc, os, zapobj); in zap_value_search() 978 (err = zap_cursor_retrieve(&zc, za)) == 0; in zap_value_search() 979 zap_cursor_advance(&zc)) { in zap_value_search() 985 zap_cursor_fini(&zc); in zap_value_search() 993 zap_cursor_t zc; in zap_join() local 998 for (zap_cursor_init(&zc, os, fromobj); in zap_join() 999 zap_cursor_retrieve(&zc, &za) == 0; in zap_join() 1000 (void) zap_cursor_advance(&zc)) { in zap_join() 1010 zap_cursor_fini(&zc); in zap_join() [all …]
|
H A D | dsl_deleg.c | 345 zap_cursor_t zc; in dsl_deleg_get() local 353 for (zap_cursor_init(&zc, mos, baseza.za_first_integer); in dsl_deleg_get() 354 zap_cursor_retrieve(&zc, &za) == 0; in dsl_deleg_get() 355 zap_cursor_advance(&zc)) { in dsl_deleg_get() 358 zap_cursor_fini(&zc); in dsl_deleg_get() 476 zap_cursor_t zc; in dsl_load_sets() local 490 for (zap_cursor_init(&zc, mos, jumpobj); in dsl_load_sets() 491 zap_cursor_retrieve(&zc, &za) == 0; in dsl_load_sets() 492 zap_cursor_advance(&zc)) { in dsl_load_sets() 504 zap_cursor_fini(&zc); in dsl_load_sets() [all …]
|
H A D | ddt_zap.c | 113 zap_cursor_t zc; in ddt_zap_walk() local 117 zap_cursor_init_serialized(&zc, os, object, *walk); in ddt_zap_walk() 118 if ((error = zap_cursor_retrieve(&zc, &za)) == 0) { in ddt_zap_walk() 130 zap_cursor_advance(&zc); in ddt_zap_walk() 131 *walk = zap_cursor_serialize(&zc); in ddt_zap_walk() 133 zap_cursor_fini(&zc); in ddt_zap_walk()
|
H A D | dsl_deadlist.c | 72 zap_cursor_t zc; in dsl_deadlist_load_tree() local 82 for (zap_cursor_init(&zc, dl->dl_os, dl->dl_object); in dsl_deadlist_load_tree() 83 zap_cursor_retrieve(&zc, &za) == 0; in dsl_deadlist_load_tree() 84 zap_cursor_advance(&zc)) { in dsl_deadlist_load_tree() 91 zap_cursor_fini(&zc); in dsl_deadlist_load_tree() 159 zap_cursor_t zc; in dsl_deadlist_free() local 168 for (zap_cursor_init(&zc, os, dlobj); in dsl_deadlist_free() 169 zap_cursor_retrieve(&zc, &za) == 0; in dsl_deadlist_free() 170 zap_cursor_advance(&zc)) { in dsl_deadlist_free() 177 zap_cursor_fini(&zc); in dsl_deadlist_free() [all …]
|
H A D | spa_errlog.c | 166 zap_cursor_t zc; in process_error_log() local 173 for (zap_cursor_init(&zc, spa->spa_meta_objset, obj); in process_error_log() 174 zap_cursor_retrieve(&zc, &za) == 0; in process_error_log() 175 zap_cursor_advance(&zc)) { in process_error_log() 178 zap_cursor_fini(&zc); in process_error_log() 187 zap_cursor_fini(&zc); in process_error_log() 194 zap_cursor_fini(&zc); in process_error_log()
|
/titanic_50/usr/src/lib/pyzfs/common/ |
H A D | ioctl.c | 63 ioctl_with_cmdstr(int ioc, zfs_cmd_t *zc) in ioctl_with_cmdstr() argument 68 zc->zc_history = (uint64_t)(uintptr_t)cmdstr; in ioctl_with_cmdstr() 69 err = ioctl(zfsdevfd, ioc, zc); in ioctl_with_cmdstr() 202 add_ds_props(zfs_cmd_t *zc, PyObject *nvl) in add_ds_props() argument 204 dmu_objset_stats_t *s = &zc->zc_objset_stats; in add_ds_props() 215 ioctl_with_dstnv(int ioc, zfs_cmd_t *zc) in ioctl_with_dstnv() argument 223 zc->zc_nvlist_dst_size = nvsz; in ioctl_with_dstnv() 224 zc->zc_nvlist_dst = (uintptr_t)nvbuf; in ioctl_with_dstnv() 226 if (ioctl(zfsdevfd, ioc, zc) == 0) { in ioctl_with_dstnv() 229 errno = nvlist_unpack(nvbuf, zc->zc_nvlist_dst_size, &nvl, 0); in ioctl_with_dstnv() [all …]
|
/titanic_50/usr/src/lib/libzfs_core/common/ |
H A D | libzfs_core.c | 123 zfs_cmd_t zc = { 0 }; in lzc_ioctl() local 130 (void) strlcpy(zc.zc_name, name, sizeof (zc.zc_name)); in lzc_ioctl() 133 zc.zc_nvlist_src = (uint64_t)(uintptr_t)packed; in lzc_ioctl() 134 zc.zc_nvlist_src_size = size; in lzc_ioctl() 138 zc.zc_nvlist_dst_size = MAX(size * 2, 128 * 1024); in lzc_ioctl() 139 zc.zc_nvlist_dst = (uint64_t)(uintptr_t) in lzc_ioctl() 140 malloc(zc.zc_nvlist_dst_size); in lzc_ioctl() 141 if (zc.zc_nvlist_dst == NULL) { in lzc_ioctl() 147 while (ioctl(g_fd, ioc, &zc) != 0) { in lzc_ioctl() 149 free((void *)(uintptr_t)zc.zc_nvlist_dst); in lzc_ioctl() [all …]
|
/titanic_50/usr/src/lib/libzfs/common/ |
H A D | libzfs_pool.c | 70 zfs_cmd_t zc = { 0 }; in zpool_get_all_props() local 73 (void) strlcpy(zc.zc_name, zhp->zpool_name, sizeof (zc.zc_name)); in zpool_get_all_props() 75 if (zcmd_alloc_dst_nvlist(hdl, &zc, 0) != 0) in zpool_get_all_props() 78 while (ioctl(hdl->libzfs_fd, ZFS_IOC_POOL_GET_PROPS, &zc) != 0) { in zpool_get_all_props() 80 if (zcmd_expand_dst_nvlist(hdl, &zc) != 0) { in zpool_get_all_props() 81 zcmd_free_nvlists(&zc); in zpool_get_all_props() 85 zcmd_free_nvlists(&zc); in zpool_get_all_props() 90 if (zcmd_read_dst_nvlist(hdl, &zc, &zhp->zpool_props) != 0) { in zpool_get_all_props() 91 zcmd_free_nvlists(&zc); in zpool_get_all_props() 95 zcmd_free_nvlists(&zc); in zpool_get_all_props() [all …]
|
H A D | libzfs_config.c | 111 zfs_cmd_t zc = { 0 }; in namespace_reload() local 131 if (zcmd_alloc_dst_nvlist(hdl, &zc, 0) != 0) in namespace_reload() 135 zc.zc_cookie = hdl->libzfs_ns_gen; in namespace_reload() 136 if (ioctl(hdl->libzfs_fd, ZFS_IOC_POOL_CONFIGS, &zc) != 0) { in namespace_reload() 142 zcmd_free_nvlists(&zc); in namespace_reload() 146 if (zcmd_expand_dst_nvlist(hdl, &zc) != 0) { in namespace_reload() 147 zcmd_free_nvlists(&zc); in namespace_reload() 153 zcmd_free_nvlists(&zc); in namespace_reload() 159 hdl->libzfs_ns_gen = zc.zc_cookie; in namespace_reload() 164 if (zcmd_read_dst_nvlist(hdl, &zc, &config) != 0) { in namespace_reload() [all …]
|
H A D | libzfs_sendrecv.c | 189 zio_cksum_t *zc, int outfd) in dump_record() argument 194 offsetof(dmu_replay_record_t, drr_u.drr_checksum.drr_checksum), zc); in dump_record() 198 drr->drr_u.drr_checksum.drr_checksum = *zc; in dump_record() 201 sizeof (zio_cksum_t), zc); in dump_record() 205 fletcher_4_incremental_native(payload, payload_len, zc); in dump_record() 217 zio_cksum_t zc = { 0 }; in zfs_send_compoundstream_begin() local 239 err = dump_record(&drr, payload, payload_len, &zc, outfd); in zfs_send_compoundstream_begin() 245 drr.drr_u.drr_end.drr_checksum = zc; in zfs_send_compoundstream_begin() 890 zfs_cmd_t zc = { 0 }; in estimate_ioctl() local 896 (void) strlcpy(zc.zc_name, zhp->zfs_name, sizeof (zc.zc_name)); in estimate_ioctl() [all …]
|
H A D | libzfs_dataset.c | 344 get_stats_ioctl(zfs_handle_t *zhp, zfs_cmd_t *zc) in get_stats_ioctl() argument 348 (void) strlcpy(zc->zc_name, zhp->zfs_name, sizeof (zc->zc_name)); in get_stats_ioctl() 350 while (ioctl(hdl->libzfs_fd, ZFS_IOC_OBJSET_STATS, zc) != 0) { in get_stats_ioctl() 352 if (zcmd_expand_dst_nvlist(hdl, zc) != 0) { in get_stats_ioctl() 370 zfs_cmd_t zc = { 0 }; in get_recvd_props_ioctl() local 373 if (zcmd_alloc_dst_nvlist(hdl, &zc, 0) != 0) in get_recvd_props_ioctl() 376 (void) strlcpy(zc.zc_name, zhp->zfs_name, sizeof (zc.zc_name)); in get_recvd_props_ioctl() 378 while (ioctl(hdl->libzfs_fd, ZFS_IOC_OBJSET_RECVD_PROPS, &zc) != 0) { in get_recvd_props_ioctl() 380 if (zcmd_expand_dst_nvlist(hdl, &zc) != 0) { in get_recvd_props_ioctl() 384 zcmd_free_nvlists(&zc); in get_recvd_props_ioctl() [all …]
|
H A D | libzfs_iter.c | 61 zfs_do_list_ioctl(zfs_handle_t *zhp, int arg, zfs_cmd_t *zc) in zfs_do_list_ioctl() argument 66 orig_cookie = zc->zc_cookie; in zfs_do_list_ioctl() 68 (void) strlcpy(zc->zc_name, zhp->zfs_name, sizeof (zc->zc_name)); in zfs_do_list_ioctl() 69 rc = ioctl(zhp->zfs_hdl->libzfs_fd, arg, zc); in zfs_do_list_ioctl() 75 if (zcmd_expand_dst_nvlist(zhp->zfs_hdl, zc) != 0) { in zfs_do_list_ioctl() 76 zcmd_free_nvlists(zc); in zfs_do_list_ioctl() 79 zc->zc_cookie = orig_cookie; in zfs_do_list_ioctl() 106 zfs_cmd_t zc = { 0 }; in zfs_iter_filesystems() local 113 if (zcmd_alloc_dst_nvlist(zhp->zfs_hdl, &zc, 0) != 0) in zfs_iter_filesystems() 117 &zc)) == 0) { in zfs_iter_filesystems() [all …]
|
H A D | libzfs_diff.c | 87 zfs_cmd_t zc = { 0 }; in get_stats_for_obj() local 90 (void) strlcpy(zc.zc_name, dsname, sizeof (zc.zc_name)); in get_stats_for_obj() 91 zc.zc_obj = obj; in get_stats_for_obj() 94 error = ioctl(di->zhp->zfs_hdl->libzfs_fd, ZFS_IOC_OBJ_TO_STATS, &zc); in get_stats_for_obj() 98 (void) memcpy(sb, &zc.zc_stat, sizeof (zfs_stat_t)); in get_stats_for_obj() 101 (void) strlcpy(pn, zc.zc_value, maxlen); in get_stats_for_obj() 373 zfs_cmd_t zc = { 0 }; in write_free_diffs() local 377 (void) strlcpy(zc.zc_name, di->fromsnap, sizeof (zc.zc_name)); in write_free_diffs() 378 zc.zc_obj = dr->ddr_first - 1; in write_free_diffs() 382 while (zc.zc_obj < dr->ddr_last) { in write_free_diffs() [all …]
|
H A D | libzfs_util.c | 703 zcmd_alloc_dst_nvlist(libzfs_handle_t *hdl, zfs_cmd_t *zc, size_t len) in zcmd_alloc_dst_nvlist() argument 707 zc->zc_nvlist_dst_size = len; in zcmd_alloc_dst_nvlist() 708 zc->zc_nvlist_dst = in zcmd_alloc_dst_nvlist() 709 (uint64_t)(uintptr_t)zfs_alloc(hdl, zc->zc_nvlist_dst_size); in zcmd_alloc_dst_nvlist() 710 if (zc->zc_nvlist_dst == 0) in zcmd_alloc_dst_nvlist() 722 zcmd_expand_dst_nvlist(libzfs_handle_t *hdl, zfs_cmd_t *zc) in zcmd_expand_dst_nvlist() argument 724 free((void *)(uintptr_t)zc->zc_nvlist_dst); in zcmd_expand_dst_nvlist() 725 zc->zc_nvlist_dst = in zcmd_expand_dst_nvlist() 726 (uint64_t)(uintptr_t)zfs_alloc(hdl, zc->zc_nvlist_dst_size); in zcmd_expand_dst_nvlist() 727 if (zc->zc_nvlist_dst == 0) in zcmd_expand_dst_nvlist() [all …]
|
H A D | libzfs_fru.c | 362 zfs_cmd_t zc = { 0 }; in zpool_fru_set() local 364 (void) strncpy(zc.zc_name, zhp->zpool_name, sizeof (zc.zc_name)); in zpool_fru_set() 365 (void) strncpy(zc.zc_value, fru, sizeof (zc.zc_value)); in zpool_fru_set() 366 zc.zc_guid = vdev_guid; in zpool_fru_set() 368 if (zfs_ioctl(zhp->zpool_hdl, ZFS_IOC_VDEV_SETFRU, &zc) != 0) in zpool_fru_set()
|
/titanic_50/usr/src/lib/libtsnet/common/ |
H A D | tsol_sgetzcent.c | 160 tsol_zcent_t *zc; in tsol_sgetzcent() local 178 if ((zc = calloc(1, sizeof (*zc))) == NULL) { in tsol_sgetzcent() 184 instr = parse_entry(zc->zc_name, sizeof (zc->zc_name), instr, "#;:\n"); in tsol_sgetzcent() 185 if (zc->zc_name[0] == '\0') { in tsol_sgetzcent() 218 slp = &zc->zc_label; in tsol_sgetzcent() 228 zc->zc_doi = 0; in tsol_sgetzcent() 232 zc->zc_match = (uchar_t)strtol(instr, &cp, 0); in tsol_sgetzcent() 252 if (!parse_mlp_list(&zc->zc_private_mlp, fieldbuf, errp, errstrp)) { in tsol_sgetzcent() 265 if (!parse_mlp_list(&zc->zc_shared_mlp, fieldbuf, errp, errstrp)) { in tsol_sgetzcent() 270 return (zc); in tsol_sgetzcent() [all …]
|
/titanic_50/usr/src/uts/common/fs/dev/ |
H A D | sdev_zvolops.c | 128 devzvol_handle_ioctl(int cmd, zfs_cmd_t *zc, size_t *alloc_size) in devzvol_handle_ioctl() argument 146 cookie = zc->zc_cookie; in devzvol_handle_ioctl() 148 zc->zc_nvlist_dst = (uint64_t)(intptr_t)kmem_alloc(size, in devzvol_handle_ioctl() 150 zc->zc_nvlist_dst_size = size; in devzvol_handle_ioctl() 151 rc = ldi_ioctl(devzvol_lh, cmd, (intptr_t)zc, FKIOCTL, kcred, in devzvol_handle_ioctl() 155 newsize = zc->zc_nvlist_dst_size; in devzvol_handle_ioctl() 157 kmem_free((void *)(uintptr_t)zc->zc_nvlist_dst, size); in devzvol_handle_ioctl() 159 zc->zc_cookie = cookie; in devzvol_handle_ioctl() 163 kmem_free((void *)(uintptr_t)zc->zc_nvlist_dst, size); in devzvol_handle_ioctl() 176 zfs_cmd_t *zc; in devzvol_objset_check() local [all …]
|
/titanic_50/usr/src/cmd/zinject/ |
H A D | zinject.c | 334 zfs_cmd_t zc = { 0 }; in iter_handlers() local 337 while (ioctl(zfs_fd, ZFS_IOC_INJECT_LIST_NEXT, &zc) == 0) in iter_handlers() 338 if ((ret = func((int)zc.zc_guid, zc.zc_name, in iter_handlers() 339 &zc.zc_inject_record, data)) != 0) in iter_handlers() 498 zfs_cmd_t zc = { 0 }; in cancel_one_handler() local 500 zc.zc_guid = (uint64_t)id; in cancel_one_handler() 502 if (ioctl(zfs_fd, ZFS_IOC_CLEAR_FAULT, &zc) != 0) { in cancel_one_handler() 531 zfs_cmd_t zc = { 0 }; in cancel_handler() local 533 zc.zc_guid = (uint64_t)id; in cancel_handler() 535 if (ioctl(zfs_fd, ZFS_IOC_CLEAR_FAULT, &zc) != 0) { in cancel_handler() [all …]
|
/titanic_50/usr/src/cmd/tsol/tnchkdb/ |
H A D | tnchkdb.c | 573 tsol_zcent_t *zc; local 600 if ((zc = tsol_sgetzcent(line, &err, &errstr)) == NULL) { 608 cipso_representable(&zc->zc_label, linenum, zc->zc_name, 611 if (strcmp(zc->zc_name, "global") == 0) 614 if ((tnl = find_zone(zc->zc_name)) != NULL) { 617 "%2$d and %3$d\n"), zc->zc_name, tnl->linenum, 621 add_zone(zc->zc_name, linenum); 624 if (zc->zc_private_mlp != NULL) 625 check_mlp_conflicts(zc->zc_private_mlp, B_FALSE, 626 zc->zc_name, linenum); [all …]
|
/titanic_50/usr/src/cmd/tsol/tnctl/ |
H A D | tnctl.c | 401 tsol_zcent_t *zc; in process_tnzone() local 417 zc = NULL; in process_tnzone() 423 if ((zc = tsol_sgetzcent(line, &err, &errstr)) == NULL) { in process_tnzone() 438 if (strcasecmp(zc->zc_name, "global") == 0) in process_tnzone() 440 tsol_freezcent(zc); in process_tnzone() 444 if (zc == NULL) { in process_tnzone() 455 handle_mlps(GLOBAL_ZONEID, zc->zc_private_mlp, 0, TNDB_LOAD); in process_tnzone() 456 handle_mlps(GLOBAL_ZONEID, zc->zc_shared_mlp, TSOL_MEF_SHARED, in process_tnzone() 459 tsol_freezcent(zc); in process_tnzone() 574 tsol_zcent_t *zc; in process_mlp() local [all …]
|
/titanic_50/usr/src/cmd/zstreamdump/ |
H A D | zstreamdump.c | 227 zio_cksum_t zc = { 0 }; in main() local 266 while (read_hdr(drr, &zc)) { in main() 276 ZIO_SET_CHECKSUM(&zc, 0, 0, 0, 0); in main() 283 sizeof (dmu_replay_record_t), &zc); in main() 357 (void) ssread(buf, sz, &zc); in main() 401 ZIO_SET_CHECKSUM(&zc, 0, 0, 0, 0); in main() 426 P2ROUNDUP(drro->drr_bonuslen, 8), &zc); in main() 479 (void) ssread(buf, drrw->drr_length, &zc); in main() 550 (void) ssread(buf, drrs->drr_length, &zc); in main() 585 P2ROUNDUP(drrwe->drr_psize, 8), &zc); in main() [all …]
|
/titanic_50/usr/src/uts/common/fs/zfs/sys/ |
H A D | zap.h | 360 void zap_cursor_init(zap_cursor_t *zc, objset_t *ds, uint64_t zapobj); 361 void zap_cursor_fini(zap_cursor_t *zc); 367 int zap_cursor_retrieve(zap_cursor_t *zc, zap_attribute_t *za); 372 void zap_cursor_advance(zap_cursor_t *zc); 381 uint64_t zap_cursor_serialize(zap_cursor_t *zc); 390 void zap_cursor_init_serialized(zap_cursor_t *zc, objset_t *ds,
|
/titanic_50/usr/src/cmd/truss/ |
H A D | expound.c | 4884 zfs_cmd_t zc; in show_zfs_ioc() local 4886 if (Pread(Proc, &zc, sizeof (zc), addr) != sizeof (zc)) { in show_zfs_ioc() 4891 if (zc.zc_name[0]) in show_zfs_ioc() 4892 (void) printf(" zc_name=%s\n", zc.zc_name); in show_zfs_ioc() 4893 if (zc.zc_value[0]) in show_zfs_ioc() 4894 (void) printf(" zc_value=%s\n", zc.zc_value); in show_zfs_ioc() 4895 if (zc.zc_string[0]) in show_zfs_ioc() 4896 (void) printf(" zc_string=%s\n", zc.zc_string); in show_zfs_ioc() 4897 if (zc.zc_guid != 0) { in show_zfs_ioc() 4899 (u_longlong_t)zc.zc_guid); in show_zfs_ioc() [all …]
|