/freebsd/cddl/contrib/opensolaris/lib/libdtrace/common/ |
H A D | dt_cg.c | 145 dt_cg_load(dt_node_t *dnp, ctf_file_t *ctfp, ctf_id_t type) in dt_cg_load() argument 166 if ((dnp->dn_flags & DT_NF_BITFIELD) && in dt_cg_load() 179 if (dnp->dn_flags & DT_NF_SIGNED) in dt_cg_load() 181 if (dnp->dn_flags & DT_NF_USERLAND) in dt_cg_load() 188 dt_cg_ptrsize(dt_node_t *dnp, dt_irlist_t *dlp, dt_regset_t *drp, in dt_cg_ptrsize() argument 191 ctf_file_t *ctfp = dnp->dn_ctfp; in dt_cg_ptrsize() 199 type = ctf_type_resolve(ctfp, dnp->dn_type); in dt_cg_ptrsize() 240 dt_cg_field_get(dt_node_t *dnp, dt_irlist_t *dlp, dt_regset_t *drp, in dt_cg_field_get() argument 253 assert(dnp->dn_op == DT_TOK_PTR || dnp->dn_op == DT_TOK_DOT); in dt_cg_field_get() 254 r1 = dnp->dn_left->dn_reg; in dt_cg_field_get() [all …]
|
H A D | dt_parser.c | 407 dt_node_promote(dt_node_t *lp, dt_node_t *rp, dt_node_t *dnp) in dt_node_promote() argument 409 dt_type_promote(lp, rp, &dnp->dn_ctfp, &dnp->dn_type); in dt_node_promote() 410 dt_node_type_assign(dnp, dnp->dn_ctfp, dnp->dn_type, B_FALSE); in dt_node_promote() 411 dt_node_attr_assign(dnp, dt_attr_min(lp->dn_attr, rp->dn_attr)); in dt_node_promote() 415 dt_node_name(const dt_node_t *dnp, char *buf, size_t len) in dt_node_name() argument 424 switch (dnp->dn_kind) { in dt_node_name() 427 (u_longlong_t)dnp->dn_value); in dt_node_name() 430 s = strchr2esc(dnp->dn_string, strlen(dnp->dn_string)); in dt_node_name() 432 s != NULL ? s : dnp->dn_string); in dt_node_name() 436 (void) snprintf(buf, len, "identifier %s", dnp->dn_string); in dt_node_name() [all …]
|
H A D | dt_cc.c | 182 dt_stmt_append(dtrace_stmtdesc_t *sdp, const dt_node_t *dnp) in dt_stmt_append() argument 196 dnerror(dnp, D_COMM_COMM, "commit( ) may " in dt_stmt_append() 201 dnerror(dnp, D_COMM_DREC, "commit( ) may " in dt_stmt_append() 209 dnerror(dnp, D_AGG_COMM, "aggregating actions " in dt_stmt_append() 219 dnerror(dnp, D_SPEC_SPEC, "speculate( ) may " in dt_stmt_append() 224 dnerror(dnp, D_SPEC_COMM, "speculate( ) may " in dt_stmt_append() 229 dnerror(dnp, D_SPEC_DREC, "speculate( ) may " in dt_stmt_append() 239 dnerror(dnp, D_AGG_SPEC, "aggregating actions " in dt_stmt_append() 249 dnerror(dnp, D_ACT_SPEC, "destructive actions " in dt_stmt_append() 254 dnerror(dnp, D_EXIT_SPEC, "exit( ) may not " in dt_stmt_append() [all …]
|
H A D | dt_pragma.c | 82 dt_pragma_attributes(const char *prname, dt_node_t *dnp) in dt_pragma_attributes() argument 90 if (dnp == NULL || dnp->dn_kind != DT_NODE_IDENT || in dt_pragma_attributes() 91 dnp->dn_list == NULL || dnp->dn_list->dn_kind != DT_NODE_IDENT) { in dt_pragma_attributes() 96 if (dtrace_str2attr(dnp->dn_string, &attr) == -1) { in dt_pragma_attributes() 101 dnp = dnp->dn_list; in dt_pragma_attributes() 102 name = dnp->dn_string; in dt_pragma_attributes() 105 dnp = dnp->dn_list; in dt_pragma_attributes() 106 name = dnp->dn_string; in dt_pragma_attributes() 108 dnp = dnp->dn_list; in dt_pragma_attributes() 109 part = dnp->dn_string; in dt_pragma_attributes() [all …]
|
H A D | dt_decl.c | 290 dt_node_t *dnp; in dt_decl_protoform() local 292 for (dnp = flist; dnp != fnp && dnp != NULL; dnp = dnp->dn_list) { in dt_decl_protoform() 293 if (dnp->dn_string != NULL && in dt_decl_protoform() 294 strcmp(dnp->dn_string, fnp->dn_string) == 0) in dt_decl_protoform() 316 dt_node_t *dnp; in dt_decl_prototype() local 318 for (dnp = plist; dnp != NULL; dnp = dnp->dn_list, i++) { in dt_decl_prototype() 320 if (dnp->dn_type == CTF_ERR && !(flags & DT_DP_VARARGS)) { in dt_decl_prototype() 321 dnerror(dnp, D_DECL_PROTO_VARARGS, "%s prototype may " in dt_decl_prototype() 325 if (dt_node_is_dynamic(dnp) && !(flags & DT_DP_DYNAMIC)) { in dt_decl_prototype() 326 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 | 60 dt_idcook_sign(dt_node_t *dnp, dt_ident_t *idp, in dt_idcook_sign() argument 109 dt_node_type_assign(dnp, idp->di_ctfp, idp->di_type, B_FALSE); in dt_idcook_sign() 118 dt_idcook_assc(dt_node_t *dnp, dt_ident_t *idp, int argc, dt_node_t *args) in dt_idcook_assc() argument 168 dt_node_type_assign(dnp, idp->di_ctfp, idp->di_type, B_FALSE); in dt_idcook_assc() 171 dt_idcook_sign(dnp, idp, argc, args, in dt_idcook_assc() 182 dt_idcook_func(dt_node_t *dnp, dt_ident_t *idp, int argc, dt_node_t *args) in dt_idcook_func() argument 315 dt_idcook_sign(dnp, idp, argc, args, "", "( )"); in dt_idcook_func() 324 dt_idcook_args(dt_node_t *dnp, dt_ident_t *idp, int argc, dt_node_t *ap) in dt_idcook_args() argument 389 dnp->dn_ident = dt_ident_create(idp->di_name, idp->di_kind, in dt_idcook_args() 393 if (dnp->dn_ident == NULL) in dt_idcook_args() [all …]
|
H A D | dt_printf.c | 62 pfcheck_addr(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp) in pfcheck_addr() argument 64 return (dt_node_is_pointer(dnp) || dt_node_is_integer(dnp)); in pfcheck_addr() 69 pfcheck_kaddr(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp) in pfcheck_kaddr() argument 71 return (dt_node_is_pointer(dnp) || dt_node_is_integer(dnp) || in pfcheck_kaddr() 72 dt_node_is_symaddr(dnp)); in pfcheck_kaddr() 77 pfcheck_uaddr(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp) in pfcheck_uaddr() argument 82 if (dt_node_is_usymaddr(dnp)) in pfcheck_uaddr() 88 return (dt_node_is_pointer(dnp) || dt_node_is_integer(dnp)); in pfcheck_uaddr() 93 pfcheck_stack(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp) in pfcheck_stack() argument 95 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() 374 dt_node_t *dnp; in dt_xlator_member() local 376 for (dnp = dxp->dx_members; dnp != NULL; dnp = dnp->dn_list) { in dt_xlator_member() 377 if (strcmp(dnp->dn_membname, name) == 0) in dt_xlator_member() 378 return (dnp); in dt_xlator_member()
|
H A D | dt_dof.c | 266 dt_node_t *dnp = *pnp++; in dof_add_difo() local 267 dt_xlator_t *dxp = dnp->dn_membexpr->dn_xlator; in dof_add_difo() 271 ddo->ddo_pgp->dp_xrefs[dxp->dx_id], dnp->dn_membid); in dof_add_difo() 345 dt_node_t *dnp; in dof_add_translator() local 362 for (dnp = dxp->dx_members; dnp != NULL; dnp = dnp->dn_list, i++) { in dof_add_translator() 369 dxp->dx_membdif[dnp->dn_membid]); in dof_add_translator() 372 dofxm.dofxm_name = dof_add_string(ddo, dnp->dn_membname); in dof_add_translator() 373 dt_node_diftype(dtp, dnp, &dofxm.dofxm_type); in dof_add_translator() 407 dt_node_t *dnp; in dof_add_probe() local 416 for (dnp = prp->pr_nargs; dnp != NULL; dnp = dnp->dn_list) { in dof_add_probe() [all …]
|
H A D | dt_provider.c | 199 dt_node_t *args = NULL, *pnp = NULL, *dnp; in dt_probe_alloc_args() local 202 for (i = 0; i < argc; i++, pnp = dnp) { in dt_probe_alloc_args() 203 if ((dnp = dt_node_xalloc(pvp->pv_hdl, DT_NODE_TYPE)) == NULL) in dt_probe_alloc_args() 206 dnp->dn_link = pvp->pv_nodes; in dt_probe_alloc_args() 207 pvp->pv_nodes = dnp; in dt_probe_alloc_args() 210 args = dnp; in dt_probe_alloc_args() 212 pnp->dn_list = dnp; in dt_probe_alloc_args() 628 dt_probe_tag(dt_probe_t *prp, uint_t argn, dt_node_t *dnp) in dt_probe_tag() argument 656 bzero(dnp, sizeof (dt_node_t)); in dt_probe_tag() 657 dnp->dn_kind = DT_NODE_TYPE; in dt_probe_tag() [all …]
|
/freebsd/sys/contrib/openzfs/module/zfs/ |
H A D | dnode_sync.c | 643 dnode_phys_t *dnp = dn->dn_phys; in dnode_sync() local 650 ASSERT(dnp->dn_type != DMU_OT_NONE || dn->dn_allocated_txg); in dnode_sync() 651 ASSERT(dnp->dn_type != DMU_OT_NONE || in dnode_sync() 652 memcmp(dnp, &zerodn, DNODE_MIN_SIZE) == 0); in dnode_sync() 689 if (dnp->dn_type == DMU_OT_NONE) { in dnode_sync() 691 dnp->dn_nlevels = 1; in dnode_sync() 692 dnp->dn_nblkptr = dn->dn_nblkptr; in dnode_sync() 695 dnp->dn_type = dn->dn_type; in dnode_sync() 696 dnp->dn_bonustype = dn->dn_bonustype; in dnode_sync() 697 dnp->dn_bonuslen = dn->dn_bonuslen; in dnode_sync() [all …]
|
H A D | dmu_traverse.c | 72 const dnode_phys_t *dnp, uint64_t objset, uint64_t object); 158 resume_skip_check(const traverse_data_t *td, const dnode_phys_t *dnp, in resume_skip_check() argument 166 if (zbookmark_subtree_completed(dnp, zb, td->td_resume)) in resume_skip_check() 181 traverse_prefetch_metadata(traverse_data_t *td, const dnode_phys_t *dnp, in traverse_prefetch_metadata() argument 194 if (resume_skip_check(td, dnp, zb) != RESUME_SKIP_NONE) in traverse_prefetch_metadata() 221 traverse_visitbp(traverse_data_t *td, const dnode_phys_t *dnp, in traverse_visitbp() argument 228 switch (resume_skip_check(td, dnp, zb)) { in traverse_visitbp() 283 err = td->td_func(td->td_spa, NULL, bp, zb, dnp, td->td_arg); in traverse_visitbp() 290 err = td->td_func(td->td_spa, NULL, bp, zb, dnp, in traverse_visitbp() 342 if (traverse_prefetch_metadata(td, dnp, in traverse_visitbp() [all …]
|
H A D | dmu_diff.c | 89 report_dnode(dmu_diffarg_t *da, uint64_t object, dnode_phys_t *dnp) in report_dnode() argument 91 ASSERT(dnp != NULL); in report_dnode() 92 if (dnp->dn_type == DMU_OT_NONE) in report_dnode() 107 #define DBP_SPAN(dnp, level) \ argument 108 (((uint64_t)dnp->dn_datablkszsec) << (SPA_MINBLOCKSHIFT + \ 109 (level) * (dnp->dn_indblkshift - SPA_BLKPTRSHIFT))) 113 const zbookmark_phys_t *zb, const dnode_phys_t *dnp, void *arg) in diff_cb() argument 127 uint64_t span = DBP_SPAN(dnp, zb->zb_level); in diff_cb()
|
H A D | dnode.c | 449 dnode_byteswap(dnode_phys_t *dnp) in dnode_byteswap() argument 451 uint64_t *buf64 = (void*)&dnp->dn_blkptr; in dnode_byteswap() 454 if (dnp->dn_type == DMU_OT_NONE) { in dnode_byteswap() 455 memset(dnp, 0, sizeof (dnode_phys_t)); in dnode_byteswap() 459 dnp->dn_datablkszsec = BSWAP_16(dnp->dn_datablkszsec); in dnode_byteswap() 460 dnp->dn_bonuslen = BSWAP_16(dnp->dn_bonuslen); in dnode_byteswap() 461 dnp->dn_extra_slots = BSWAP_8(dnp->dn_extra_slots); in dnode_byteswap() 462 dnp->dn_maxblkid = BSWAP_64(dnp->dn_maxblkid); in dnode_byteswap() 463 dnp->dn_used = BSWAP_64(dnp->dn_used); in dnode_byteswap() 469 ASSERT(dnp->dn_indblkshift <= SPA_MAXBLOCKSHIFT); in dnode_byteswap() [all …]
|
H A D | dmu_send.c | 181 dnode_phys_t *dnp; member 234 (range->sru.object.dnp->dn_extra_slots + 1); in range_free() 235 kmem_free(range->sru.object.dnp, size); in range_free() 713 dnode_phys_t *dnp) in dump_dnode() argument 731 if (dnp == NULL || dnp->dn_type == DMU_OT_NONE) in dump_dnode() 744 drro->drr_type = dnp->dn_type; in dump_dnode() 745 drro->drr_bonustype = dnp->dn_bonustype; in dump_dnode() 746 drro->drr_blksz = dnp->dn_datablkszsec << SPA_MINBLOCKSHIFT; in dump_dnode() 747 drro->drr_bonuslen = dnp->dn_bonuslen; in dump_dnode() 748 drro->drr_dn_slots = dnp->dn_extra_slots + 1; in dump_dnode() [all …]
|
/freebsd/sys/contrib/openzfs/include/sys/ |
H A D | dnode.h | 127 #define DN_BONUS(dnp) ((void*)((dnp)->dn_bonus_flexible + \ argument 128 (((dnp)->dn_nblkptr - 1) * sizeof (blkptr_t)))) 129 #define DN_MAX_BONUS_LEN(dnp) \ argument 130 ((dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR) ? \ 131 (uint8_t *)DN_SPILL_BLKPTR(dnp) - (uint8_t *)DN_BONUS(dnp) : \ 132 (uint8_t *)(dnp + (dnp->dn_extra_slots + 1)) - (uint8_t *)DN_BONUS(dnp)) 134 #define DN_USED_BYTES(dnp) (((dnp)->dn_flags & DNODE_FLAG_USED_BYTES) ? \ argument 135 (dnp)->dn_used : (dnp)->dn_used << SPA_MINBLOCKSHIFT) 280 #define DN_SPILL_BLKPTR(dnp) ((blkptr_t *)((char *)(dnp) + \ argument 281 (((dnp)->dn_extra_slots + 1) << DNODE_SHIFT) - (1 << SPA_BLKPTRSHIFT))) [all …]
|
/freebsd/sys/fs/p9fs/ |
H A D | p9fs_vnops.c | 176 struct p9fs_node *dnp; member 186 return (p9fs_vget_common(mp, NULL, p9aa->cnp->cn_lkflags, p9aa->dnp, in p9fs_lookup_alloc() 220 struct p9fs_node *dnp; /*dir p9_node */ in p9fs_lookup() local 233 dnp = P9FS_VTON(dvp); in p9fs_lookup() 238 if (dnp == NULL) in p9fs_lookup() 247 vses = dnp->p9fs_ses; in p9fs_lookup() 263 dvfid = p9fs_get_fid(vses->clnt, dnp, cnp->cn_cred, VFID, -1, &error); in p9fs_lookup() 355 p9aa.dnp = dnp; in p9fs_lookup() 376 dnp, newfid, &vp, cnp->cn_nameptr); in p9fs_lookup() 382 if ((dnp->inode.i_mode & ISVTX) && in p9fs_lookup() [all …]
|
/freebsd/sys/fs/nfsclient/ |
H A D | nfs_clvnops.c | 1652 struct nfsnode *np = NULL, *dnp; in nfs_mknodrpc() local 1694 dnp = VTONFS(dvp); in nfs_mknodrpc() 1695 NFSLOCKNODE(dnp); in nfs_mknodrpc() 1696 dnp->n_flag |= NMODIFIED; in nfs_mknodrpc() 1698 dnp->n_attrstamp = 0; in nfs_mknodrpc() 1701 NFSUNLOCKNODE(dnp); in nfs_mknodrpc() 1749 struct nfsnode *np = NULL, *dnp; in nfs_create() local 1768 dnp = VTONFS(dvp); in nfs_create() 1772 NFSLOCKNODE(dnp); in nfs_create() 1773 while (NFSHASNFSV4(nmp) && (dnp->n_flag & NREMOVEINPROG)) { in nfs_create() [all …]
|
/freebsd/sys/contrib/openzfs/module/os/freebsd/zfs/ |
H A D | zio_crypt.c | 807 dnode_phys_t *dnp, *sdnp, *ddnp; in zio_crypt_copy_dnode_bonus() local 815 dnp = &sdnp[i]; in zio_crypt_copy_dnode_bonus() 816 if (dnp->dn_type != DMU_OT_NONE && in zio_crypt_copy_dnode_bonus() 817 DMU_OT_IS_ENCRYPTED(dnp->dn_bonustype) && in zio_crypt_copy_dnode_bonus() 818 dnp->dn_bonuslen != 0) { in zio_crypt_copy_dnode_bonus() 819 memcpy(DN_BONUS(&ddnp[i]), DN_BONUS(dnp), in zio_crypt_copy_dnode_bonus() 820 DN_MAX_BONUS_LEN(dnp)); in zio_crypt_copy_dnode_bonus() 954 boolean_t should_bswap, dnode_phys_t *dnp) in zio_crypt_do_dnode_hmac_updates() argument 962 memcpy(tmp_dncore, dnp, sizeof (tmp_dncore)); in zio_crypt_do_dnode_hmac_updates() 975 for (i = 0; i < dnp->dn_nblkptr; i++) { in zio_crypt_do_dnode_hmac_updates() [all …]
|
/freebsd/sys/fs/smbfs/ |
H A D | smbfs_node.c | 108 struct smbnode *np, *dnp; in smbfs_node_alloc() local 133 dnp = dvp ? VTOSMB(dvp) : NULL; in smbfs_node_alloc() 134 if (dnp == NULL && dvp != NULL) { in smbfs_node_alloc() 232 struct smbnode *dnp; in smbfs_nget() local 236 dnp = (dvp) ? VTOSMB(dvp) : NULL; in smbfs_nget() 238 if (dnp != NULL) { in smbfs_nget() 239 sep = SMBFS_DNP_SEP(dnp); in smbfs_nget() 240 error = smbfs_node_alloc(mp, dvp, dnp->n_rpath, dnp->n_rplen, in smbfs_nget()
|
H A D | smbfs_subr.h | 151 int smbfs_smb_create(struct smbnode *dnp, const char *name, int len, 159 int smbfs_smb_mkdir(struct smbnode *dnp, const char *name, int len, 162 int smbfs_findopen(struct smbnode *dnp, const char *wildcard, int wclen, 167 struct smbnode *dnp, const char *name, int nmlen); 168 int smbfs_smb_lookup(struct smbnode *dnp, const char *name, int nmlen,
|
H A D | smbfs_subr.c | 110 smbfs_fullpath(struct mbchain *mbp, struct smb_vc *vcp, struct smbnode *dnp, in smbfs_fullpath() argument 123 if (dnp != NULL) { in smbfs_fullpath() 124 error = smb_put_dmem(mbp, vcp, dnp->n_rpath, dnp->n_rplen, in smbfs_fullpath()
|
H A D | smbfs_smb.c | 62 smbfs_getino(struct smbnode *dnp, const char *name, int nmlen) in smbfs_getino() argument 75 return dnp->n_ino + ino; in smbfs_getino() 79 ino = dnp->n_ino + smbfs_hash(name, nmlen); in smbfs_getino() 749 smbfs_smb_create(struct smbnode *dnp, const char *name, int nmlen, in smbfs_smb_create() argument 753 struct smb_share *ssp = dnp->n_mount->sm_share; in smbfs_smb_create() 774 error = smbfs_fullpath(mbp, SSTOVC(ssp), dnp, name, nmlen); in smbfs_smb_create() 889 smbfs_smb_mkdir(struct smbnode *dnp, const char *name, int len, in smbfs_smb_mkdir() argument 893 struct smb_share *ssp = dnp->n_mount->sm_share; in smbfs_smb_mkdir() 906 error = smbfs_fullpath(mbp, SSTOVC(ssp), dnp, name, len); in smbfs_smb_mkdir() 1017 smbfs_findopenLM1(struct smbfs_fctx *ctx, struct smbnode *dnp, in smbfs_findopenLM1() argument [all …]
|
/freebsd/sys/contrib/openzfs/module/os/linux/zfs/ |
H A D | zio_crypt.c | 890 dnode_phys_t *dnp, *sdnp, *ddnp; in zio_crypt_copy_dnode_bonus() local 898 dnp = &sdnp[i]; in zio_crypt_copy_dnode_bonus() 899 if (dnp->dn_type != DMU_OT_NONE && in zio_crypt_copy_dnode_bonus() 900 DMU_OT_IS_ENCRYPTED(dnp->dn_bonustype) && in zio_crypt_copy_dnode_bonus() 901 dnp->dn_bonuslen != 0) { in zio_crypt_copy_dnode_bonus() 902 memcpy(DN_BONUS(&ddnp[i]), DN_BONUS(dnp), in zio_crypt_copy_dnode_bonus() 903 DN_MAX_BONUS_LEN(dnp)); in zio_crypt_copy_dnode_bonus() 1051 boolean_t should_bswap, dnode_phys_t *dnp) in zio_crypt_do_dnode_hmac_updates() argument 1068 memcpy(&tmp_dncore, dnp, dn_core_size); in zio_crypt_do_dnode_hmac_updates() 1090 for (i = 0; i < dnp->dn_nblkptr; i++) { in zio_crypt_do_dnode_hmac_updates() [all …]
|