/illumos-gate/usr/src/lib/libdtrace/common/ |
H A D | dt_cg.c | 148 dt_cg_load(dt_node_t *dnp, ctf_file_t *ctfp, ctf_id_t type) in dt_cg_load() argument 169 if ((dnp->dn_flags & DT_NF_BITFIELD) && in dt_cg_load() 171 uint_t nbits = e.cte_bits + (dnp->dn_bitoff % NBBY); in dt_cg_load() 184 if (dnp->dn_flags & DT_NF_SIGNED) in dt_cg_load() 186 if (dnp->dn_flags & DT_NF_USERLAND) in dt_cg_load() 193 dt_cg_ptrsize(dt_node_t *dnp, dt_irlist_t *dlp, dt_regset_t *drp, in dt_cg_ptrsize() argument 196 ctf_file_t *ctfp = dnp->dn_ctfp; in dt_cg_ptrsize() 204 type = ctf_type_resolve(ctfp, dnp->dn_type); in dt_cg_ptrsize() 245 dt_cg_field_get(dt_node_t *dnp, dt_irlist_t *dlp, dt_regset_t *drp, in dt_cg_field_get() argument 258 assert(dnp->dn_op == DT_TOK_PTR || dnp->dn_op == DT_TOK_DOT); in dt_cg_field_get() [all …]
|
H A D | dt_parser.c | 403 dt_node_promote(dt_node_t *lp, dt_node_t *rp, dt_node_t *dnp) in dt_node_promote() argument 405 dt_type_promote(lp, rp, &dnp->dn_ctfp, &dnp->dn_type); in dt_node_promote() 406 dt_node_type_assign(dnp, dnp->dn_ctfp, dnp->dn_type, B_FALSE); in dt_node_promote() 407 dt_node_attr_assign(dnp, dt_attr_min(lp->dn_attr, rp->dn_attr)); in dt_node_promote() 411 dt_node_name(const dt_node_t *dnp, char *buf, size_t len) in dt_node_name() argument 420 switch (dnp->dn_kind) { in dt_node_name() 423 (u_longlong_t)dnp->dn_value); in dt_node_name() 426 s = strchr2esc(dnp->dn_string, strlen(dnp->dn_string)); in dt_node_name() 428 s != NULL ? s : dnp->dn_string); in dt_node_name() 432 (void) snprintf(buf, len, "identifier %s", dnp->dn_string); in dt_node_name() [all …]
|
H A D | dt_pragma.c | 77 dt_pragma_attributes(const char *prname, dt_node_t *dnp) in dt_pragma_attributes() argument 85 if (dnp == NULL || dnp->dn_kind != DT_NODE_IDENT || in dt_pragma_attributes() 86 dnp->dn_list == NULL || dnp->dn_list->dn_kind != DT_NODE_IDENT) { in dt_pragma_attributes() 91 if (dtrace_str2attr(dnp->dn_string, &attr) == -1) { in dt_pragma_attributes() 96 dnp = dnp->dn_list; in dt_pragma_attributes() 97 name = dnp->dn_string; in dt_pragma_attributes() 100 dnp = dnp->dn_list; in dt_pragma_attributes() 101 name = dnp->dn_string; in dt_pragma_attributes() 103 dnp = dnp->dn_list; in dt_pragma_attributes() 104 part = dnp->dn_string; in dt_pragma_attributes() [all …]
|
H A D | dt_cc.c | 181 dt_stmt_append(dtrace_stmtdesc_t *sdp, const dt_node_t *dnp) in dt_stmt_append() argument 195 dnerror(dnp, D_COMM_COMM, "commit( ) may " in dt_stmt_append() 200 dnerror(dnp, D_COMM_DREC, "commit( ) may " in dt_stmt_append() 208 dnerror(dnp, D_AGG_COMM, "aggregating actions " in dt_stmt_append() 218 dnerror(dnp, D_SPEC_SPEC, "speculate( ) may " in dt_stmt_append() 223 dnerror(dnp, D_SPEC_COMM, "speculate( ) may " in dt_stmt_append() 228 dnerror(dnp, D_SPEC_DREC, "speculate( ) may " in dt_stmt_append() 238 dnerror(dnp, D_AGG_SPEC, "aggregating actions " in dt_stmt_append() 248 dnerror(dnp, D_ACT_SPEC, "destructive actions " in dt_stmt_append() 253 dnerror(dnp, D_EXIT_SPEC, "exit( ) may not " in dt_stmt_append() [all …]
|
H A D | dt_decl.c | 307 dt_node_t *dnp; in dt_decl_protoform() local 309 for (dnp = flist; dnp != fnp && dnp != NULL; dnp = dnp->dn_list) { in dt_decl_protoform() 310 if (dnp->dn_string != NULL && in dt_decl_protoform() 311 strcmp(dnp->dn_string, fnp->dn_string) == 0) in dt_decl_protoform() 333 dt_node_t *dnp; in dt_decl_prototype() local 335 for (dnp = plist; dnp != NULL; dnp = dnp->dn_list, i++) { in dt_decl_prototype() 337 if (dnp->dn_type == CTF_ERR && !(flags & DT_DP_VARARGS)) { in dt_decl_prototype() 338 dnerror(dnp, D_DECL_PROTO_VARARGS, "%s prototype may " in dt_decl_prototype() 342 if (dt_node_is_dynamic(dnp) && !(flags & DT_DP_DYNAMIC)) { in dt_decl_prototype() 343 dnerror(dnp, D_DECL_PROTO_TYPE, "%s prototype may not " in dt_decl_prototype() [all …]
|
H A D | dt_sugar.c | 193 dt_sugar_visit_all(dt_sugar_parse_t *dp, dt_node_t *dnp) in dt_sugar_visit_all() argument 197 switch (dnp->dn_kind) { in dt_sugar_visit_all() 209 for (arg = dnp->dn_args; arg != NULL; arg = arg->dn_list) in dt_sugar_visit_all() 214 dt_sugar_visit_all(dp, dnp->dn_child); in dt_sugar_visit_all() 218 dt_sugar_visit_all(dp, dnp->dn_left); in dt_sugar_visit_all() 219 dt_sugar_visit_all(dp, dnp->dn_right); in dt_sugar_visit_all() 220 if (dnp->dn_op == DT_TOK_LBRAC) { in dt_sugar_visit_all() 221 dt_node_t *ln = dnp->dn_right; in dt_sugar_visit_all() 230 dt_sugar_visit_all(dp, dnp->dn_expr); in dt_sugar_visit_all() 231 dt_sugar_visit_all(dp, dnp->dn_left); in dt_sugar_visit_all() [all …]
|
H A D | dt_ident.c | 52 dt_idcook_sign(dt_node_t *dnp, dt_ident_t *idp, in dt_idcook_sign() argument 101 dt_node_type_assign(dnp, idp->di_ctfp, idp->di_type, B_FALSE); in dt_idcook_sign() 110 dt_idcook_assc(dt_node_t *dnp, dt_ident_t *idp, int argc, dt_node_t *args) in dt_idcook_assc() argument 160 dt_node_type_assign(dnp, idp->di_ctfp, idp->di_type, B_FALSE); in dt_idcook_assc() 163 dt_idcook_sign(dnp, idp, argc, args, in dt_idcook_assc() 174 dt_idcook_func(dt_node_t *dnp, dt_ident_t *idp, int argc, dt_node_t *args) in dt_idcook_func() argument 305 dt_idcook_sign(dnp, idp, argc, args, "", "( )"); in dt_idcook_func() 314 dt_idcook_args(dt_node_t *dnp, dt_ident_t *idp, int argc, dt_node_t *ap) in dt_idcook_args() argument 379 dnp->dn_ident = dt_ident_create(idp->di_name, idp->di_kind, in dt_idcook_args() 383 if (dnp->dn_ident == NULL) in dt_idcook_args() [all …]
|
H A D | dt_printf.c | 48 pfcheck_addr(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp) in pfcheck_addr() argument 50 return (dt_node_is_pointer(dnp) || dt_node_is_integer(dnp)); in pfcheck_addr() 55 pfcheck_kaddr(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp) in pfcheck_kaddr() argument 57 return (dt_node_is_pointer(dnp) || dt_node_is_integer(dnp) || in pfcheck_kaddr() 58 dt_node_is_symaddr(dnp)); in pfcheck_kaddr() 63 pfcheck_uaddr(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp) in pfcheck_uaddr() argument 68 if (dt_node_is_usymaddr(dnp)) in pfcheck_uaddr() 74 return (dt_node_is_pointer(dnp) || dt_node_is_integer(dnp)); in pfcheck_uaddr() 79 pfcheck_stack(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp) in pfcheck_stack() argument 81 return (dt_node_is_stack(dnp)); in pfcheck_stack() [all …]
|
H A D | dt_xlator.c | 104 dt_node_t *dnp; in dt_xlator_create() local 217 for (dnp = dxp->dx_members; dnp != NULL; dnp = dnp->dn_list) { in dt_xlator_create() 218 dnp->dn_membxlator = dxp; in dt_xlator_create() 219 dnp->dn_membid = dxp->dx_nmembers++; in dt_xlator_create() 372 dt_node_t *dnp; in dt_xlator_member() local 374 for (dnp = dxp->dx_members; dnp != NULL; dnp = dnp->dn_list) { in dt_xlator_member() 375 if (strcmp(dnp->dn_membname, name) == 0) in dt_xlator_member() 376 return (dnp); in dt_xlator_member()
|
H A D | dt_dof.c | 262 dt_node_t *dnp = *pnp++; in dof_add_difo() local 263 dt_xlator_t *dxp = dnp->dn_membexpr->dn_xlator; in dof_add_difo() 267 ddo->ddo_pgp->dp_xrefs[dxp->dx_id], dnp->dn_membid); in dof_add_difo() 341 dt_node_t *dnp; in dof_add_translator() local 358 for (dnp = dxp->dx_members; dnp != NULL; dnp = dnp->dn_list, i++) { in dof_add_translator() 365 dxp->dx_membdif[dnp->dn_membid]); in dof_add_translator() 368 dofxm.dofxm_name = dof_add_string(ddo, dnp->dn_membname); in dof_add_translator() 369 dt_node_diftype(dtp, dnp, &dofxm.dofxm_type); in dof_add_translator() 403 dt_node_t *dnp; in dof_add_probe() local 412 for (dnp = prp->pr_nargs; dnp != NULL; dnp = dnp->dn_list) { in dof_add_probe() [all …]
|
/illumos-gate/usr/src/uts/common/fs/smbclnt/smbfs/ |
H A D | smbfs_node.c | 110 smbfs_getino(struct smbnode *dnp, const char *name, int nmlen) in smbfs_getino() argument 116 ino = (uint32_t)dnp->n_ino; in smbfs_getino() 119 sep = SMBFS_DNP_SEP(dnp); in smbfs_getino() 164 struct smbnode *dnp = VTOSMB(dvp); in smbfs_nget() local 177 sep = SMBFS_DNP_SEP(dnp); in smbfs_nget() 180 np = smbfs_node_findcreate(dnp->n_mount, in smbfs_nget() 181 dnp->n_rpath, dnp->n_rplen, in smbfs_nget() 194 if (dnp->n_flag & N_XATTR) { in smbfs_nget() 212 smbfs_attr_touchdir(struct smbnode *dnp) in smbfs_attr_touchdir() argument 215 mutex_enter(&dnp->r_statelock); in smbfs_attr_touchdir() [all …]
|
H A D | smbfs_smb.c | 455 struct smbnode *dnp, in smbfs_smb_create() argument 463 struct smb_share *ssp = dnp->n_mount->smi_share; in smbfs_smb_create() 483 error = smbfs_smb_ntcreatex(dnp, in smbfs_smb_create() 535 smbfs_smb_mkdir(struct smbnode *dnp, const char *name, int nmlen, in smbfs_smb_mkdir() argument 539 struct smb_share *ssp = dnp->n_mount->smi_share; in smbfs_smb_mkdir() 558 error = smbfs_smb_ntcreatex(dnp, in smbfs_smb_mkdir() 576 smbfs_smb_findopen(struct smbnode *dnp, const char *wild, int wlen, in smbfs_smb_findopen() argument 580 struct smb_share *ssp = dnp->n_mount->smi_share; in smbfs_smb_findopen() 588 ctx->f_dnp = dnp; in smbfs_smb_findopen() 592 if (dnp->n_flag & N_XATTR) { in smbfs_smb_findopen() [all …]
|
H A D | smbfs_subr.h | 208 int smbfs_smb_create(struct smbnode *dnp, const char *name, int nmlen, 213 int smbfs_smb_mkdir(struct smbnode *dnp, const char *name, int len, 216 int smbfs_smb_findopen(struct smbnode *dnp, const char *wildcard, int wclen, 222 int smbfs_smb_lookup(struct smbnode *dnp, const char **namep, int *nmlenp, 254 int smbfs_smb_findopenLM2(struct smbfs_fctx *ctx, struct smbnode *dnp, 292 int smbfs_smb2_findopen(struct smbfs_fctx *ctx, struct smbnode *dnp, 310 struct smbnode *dnp, const char *name, int nmlen, uint8_t sep); 352 void smbfs_attr_touchdir(struct smbnode *dnp); 365 uint32_t smbfs_getino(struct smbnode *dnp, const char *name, int nmlen); 401 int smbfs_xa_findopen(struct smbfs_fctx *ctx, struct smbnode *dnp,
|
/illumos-gate/usr/src/uts/common/os/ |
H A D | modsubr.c | 132 struct devnames *dnp; in mod_rele_dev_by_major() local 137 dnp = &devnamesp[major]; in mod_rele_dev_by_major() 138 LOCK_DEV_OPS(&dnp->dn_lock); in mod_rele_dev_by_major() 154 UNLOCK_DEV_OPS(&dnp->dn_lock); in mod_rele_dev_by_major() 166 UNLOCK_DEV_OPS(&dnp->dn_lock); in mod_rele_dev_by_major() 374 struct devnames *dnp; in impl_make_parlist() local 376 dnp = &devnamesp[major]; in impl_make_parlist() 378 ASSERT(mutex_owned(&dnp->dn_lock)); in impl_make_parlist() 384 if (dnp->dn_flags & (DN_CONF_PARSED | DN_DRIVER_REMOVED)) in impl_make_parlist() 385 return (dnp->dn_pl); in impl_make_parlist() [all …]
|
H A D | instance.c | 57 static void in_removenode(struct devnames *dnp, in_node_t *mp, in_node_t *ap); 71 static void in_removedrv(struct devnames *dnp, in_drv_t *mp); 238 struct devnames *dnp; in in_preassign_instance() local 243 dnp = &devnamesp[m]; in in_preassign_instance() 244 dip = dnp->dn_head; in in_preassign_instance() 246 DEVI(dip)->devi_instance = dnp->dn_instance; in in_preassign_instance() 247 dnp->dn_instance++; in in_preassign_instance() 262 dnp->dn_pinstance = dnp->dn_instance; in in_preassign_instance() 263 dnp->dn_instance = IN_SEARCHME; in in_preassign_instance() 668 struct devnames *dnp; in e_ddi_instance_majorinstance_to_path() local [all …]
|
H A D | devcfg.c | 1374 struct devnames *dnp; in detach_node() local 1463 dnp = &(devnamesp[DEVI(dip)->devi_major]); in detach_node() 1464 LOCK_DEV_OPS(&dnp->dn_lock); in detach_node() 1465 dnp->dn_flags &= ~DN_DRIVER_HELD; in detach_node() 1466 UNLOCK_DEV_OPS(&dnp->dn_lock); in detach_node() 1530 struct devnames *dnp; in predetach_node() local 1540 dnp = &devnamesp[DEVI(dip)->devi_major]; in predetach_node() 1541 LOCK_DEV_OPS(&dnp->dn_lock); in predetach_node() 1542 if (dnp->dn_flags & DN_NO_AUTODETACH) { in predetach_node() 1543 UNLOCK_DEV_OPS(&dnp->dn_lock); in predetach_node() [all …]
|
/illumos-gate/usr/src/uts/common/fs/zfs/ |
H A D | dnode_sync.c | 624 dnode_phys_t *dnp = dn->dn_phys; in dnode_sync() local 631 ASSERT(dnp->dn_type != DMU_OT_NONE || dn->dn_allocated_txg); in dnode_sync() 632 ASSERT(dnp->dn_type != DMU_OT_NONE || in dnode_sync() 633 bcmp(dnp, &zerodn, DNODE_MIN_SIZE) == 0); in dnode_sync() 665 if (dnp->dn_type == DMU_OT_NONE) { in dnode_sync() 667 dnp->dn_nlevels = 1; in dnode_sync() 668 dnp->dn_nblkptr = dn->dn_nblkptr; in dnode_sync() 671 dnp->dn_type = dn->dn_type; in dnode_sync() 672 dnp->dn_bonustype = dn->dn_bonustype; in dnode_sync() 673 dnp->dn_bonuslen = dn->dn_bonuslen; in dnode_sync() [all …]
|
H A D | dmu_traverse.c | 70 static int traverse_dnode(traverse_data_t *td, const dnode_phys_t *dnp, 153 resume_skip_check(traverse_data_t *td, const dnode_phys_t *dnp, in resume_skip_check() argument 161 if (zbookmark_subtree_completed(dnp, zb, td->td_resume)) in resume_skip_check() 216 traverse_visitbp(traverse_data_t *td, const dnode_phys_t *dnp, in traverse_visitbp() argument 225 switch (resume_skip_check(td, dnp, zb)) { in traverse_visitbp() 280 err = td->td_func(td->td_spa, NULL, bp, zb, dnp, td->td_arg); in traverse_visitbp() 287 err = td->td_func(td->td_spa, NULL, bp, zb, dnp, in traverse_visitbp() 321 err = traverse_visitbp(td, dnp, &cbp[i], &czb); in traverse_visitbp() 413 err = td->td_func(td->td_spa, NULL, bp, zb, dnp, td->td_arg); in traverse_visitbp() 443 (dnp->dn_indblkshift - SPA_BLKPTRSHIFT); in traverse_visitbp() [all …]
|
H A D | dmu_diff.c | 86 report_dnode(struct diffarg *da, uint64_t object, dnode_phys_t *dnp) in report_dnode() argument 88 ASSERT(dnp != NULL); in report_dnode() 89 if (dnp->dn_type == DMU_OT_NONE) in report_dnode() 104 #define DBP_SPAN(dnp, level) \ argument 105 (((uint64_t)dnp->dn_datablkszsec) << (SPA_MINBLOCKSHIFT + \ 106 (level) * (dnp->dn_indblkshift - SPA_BLKPTRSHIFT))) 111 const zbookmark_phys_t *zb, const dnode_phys_t *dnp, void *arg) in diff_cb() argument 123 uint64_t span = DBP_SPAN(dnp, zb->zb_level); in diff_cb()
|
H A D | dnode.c | 321 dnode_byteswap(dnode_phys_t *dnp) in dnode_byteswap() argument 323 uint64_t *buf64 = (void*)&dnp->dn_blkptr; in dnode_byteswap() 326 if (dnp->dn_type == DMU_OT_NONE) { in dnode_byteswap() 327 bzero(dnp, sizeof (dnode_phys_t)); in dnode_byteswap() 331 dnp->dn_datablkszsec = BSWAP_16(dnp->dn_datablkszsec); in dnode_byteswap() 332 dnp->dn_bonuslen = BSWAP_16(dnp->dn_bonuslen); in dnode_byteswap() 333 dnp->dn_extra_slots = BSWAP_8(dnp->dn_extra_slots); in dnode_byteswap() 334 dnp->dn_maxblkid = BSWAP_64(dnp->dn_maxblkid); in dnode_byteswap() 335 dnp->dn_used = BSWAP_64(dnp->dn_used); in dnode_byteswap() 341 ASSERT(dnp->dn_indblkshift <= SPA_MAXBLOCKSHIFT); in dnode_byteswap() [all …]
|
H A D | dmu_send.c | 481 dnode_phys_t *dnp) in dump_dnode() argument 499 if (dnp == NULL || dnp->dn_type == DMU_OT_NONE) in dump_dnode() 512 drro->drr_type = dnp->dn_type; in dump_dnode() 513 drro->drr_bonustype = dnp->dn_bonustype; in dump_dnode() 514 drro->drr_blksz = dnp->dn_datablkszsec << SPA_MINBLOCKSHIFT; in dump_dnode() 515 drro->drr_bonuslen = dnp->dn_bonuslen; in dump_dnode() 516 drro->drr_dn_slots = dnp->dn_extra_slots + 1; in dump_dnode() 517 drro->drr_checksumtype = dnp->dn_checksum; in dump_dnode() 518 drro->drr_compress = dnp->dn_compress; in dump_dnode() 525 bonuslen = P2ROUNDUP(dnp->dn_bonuslen, 8); in dump_dnode() [all …]
|
H A D | zio_crypt.c | 897 dnode_phys_t *dnp, *sdnp, *ddnp; in zio_crypt_copy_dnode_bonus() local 905 dnp = &sdnp[i]; in zio_crypt_copy_dnode_bonus() 906 if (dnp->dn_type != DMU_OT_NONE && in zio_crypt_copy_dnode_bonus() 907 DMU_OT_IS_ENCRYPTED(dnp->dn_bonustype) && in zio_crypt_copy_dnode_bonus() 908 dnp->dn_bonuslen != 0) { in zio_crypt_copy_dnode_bonus() 909 bcopy(DN_BONUS(dnp), DN_BONUS(&ddnp[i]), in zio_crypt_copy_dnode_bonus() 910 DN_MAX_BONUS_LEN(dnp)); in zio_crypt_copy_dnode_bonus() 1058 boolean_t should_bswap, dnode_phys_t *dnp) in zio_crypt_do_dnode_hmac_updates() argument 1074 bcopy(dnp, tmp_dncore, cd.cd_length); in zio_crypt_do_dnode_hmac_updates() 1090 for (i = 0; i < dnp->dn_nblkptr; i++) { in zio_crypt_do_dnode_hmac_updates() [all …]
|
/illumos-gate/usr/src/uts/common/fs/zfs/sys/ |
H A D | dnode.h | 123 #define DN_BONUS(dnp) ((void*)((dnp)->dn_bonus + \ argument 124 (((dnp)->dn_nblkptr - 1) * sizeof (blkptr_t)))) 125 #define DN_MAX_BONUS_LEN(dnp) \ argument 126 ((dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR) ? \ 127 (uint8_t *)DN_SPILL_BLKPTR(dnp) - (uint8_t *)DN_BONUS(dnp) : \ 128 (uint8_t *)(dnp + (dnp->dn_extra_slots + 1)) - (uint8_t *)DN_BONUS(dnp)) 130 #define DN_USED_BYTES(dnp) (((dnp)->dn_flags & DNODE_FLAG_USED_BYTES) ? \ argument 131 (dnp)->dn_used : (dnp)->dn_used << SPA_MINBLOCKSHIFT) 249 #define DN_SPILL_BLKPTR(dnp) ((blkptr_t *)((char *)(dnp) + \ argument 250 (((dnp)->dn_extra_slots + 1) << DNODE_SHIFT) - (1 << SPA_BLKPTRSHIFT))) [all …]
|
/illumos-gate/usr/src/tools/ndrgen/ |
H A D | ndr_print.c | 253 ndr_node_t *dnp = np->n_m_decl; in print_declaration() local 265 if (dnp && dnp->label == STAR) { in print_declaration() 267 while (dnp && dnp->label == STAR) { in print_declaration() 269 dnp = dnp->n_d_descend; in print_declaration() 279 print_node(dnp); in print_declaration()
|
/illumos-gate/usr/src/lib/libdlpi/common/ |
H A D | libdlpi.c | 244 dlpi_notifyent_t *next, *dnp; in dlpi_close() local 247 for (dnp = dip->dli_notifylistp; dnp != NULL; dnp = next) { in dlpi_close() 248 next = dnp->dln_next; in dlpi_close() 249 free(dnp); in dlpi_close() 1737 dlpi_notifyent_t *dnp; local 1780 for (dnp = dip->dli_notifylistp; dnp != NULL; dnp = dnp->dln_next) { 1781 if (note & dnp->dln_notes) 1782 dnp->dln_fnp((dlpi_handle_t)dip, ¬ifinfo, dnp->arg); 1783 if (dnp->dln_rm) 1801 dlpi_notifyent_t *dnp; local [all …]
|