Home
last modified time | relevance | path

Searched refs:dn (Results 1 – 25 of 119) sorted by relevance

12345

/freebsd/sys/contrib/openzfs/module/zfs/
H A Ddnode.c125 dnode_t *dn = arg; in dnode_cons() local
127 rw_init(&dn->dn_struct_rwlock, NULL, RW_NOLOCKDEP, NULL); in dnode_cons()
128 mutex_init(&dn->dn_mtx, NULL, MUTEX_DEFAULT, NULL); in dnode_cons()
129 mutex_init(&dn->dn_dbufs_mtx, NULL, MUTEX_DEFAULT, NULL); in dnode_cons()
130 cv_init(&dn->dn_notxholds, NULL, CV_DEFAULT, NULL); in dnode_cons()
131 cv_init(&dn->dn_nodnholds, NULL, CV_DEFAULT, NULL); in dnode_cons()
137 zfs_refcount_create_untracked(&dn->dn_holds); in dnode_cons()
138 zfs_refcount_create(&dn->dn_tx_holds); in dnode_cons()
139 list_link_init(&dn->dn_link); in dnode_cons()
141 memset(dn->dn_next_type, 0, sizeof (dn->dn_next_type)); in dnode_cons()
[all …]
H A Ddnode_sync.c42 dnode_increase_indirection(dnode_t *dn, dmu_tx_t *tx) in dnode_increase_indirection() argument
46 int nblkptr = dn->dn_phys->dn_nblkptr; in dnode_increase_indirection()
47 int old_toplvl = dn->dn_phys->dn_nlevels - 1; in dnode_increase_indirection()
48 int new_level = dn->dn_next_nlevels[txgoff]; in dnode_increase_indirection()
51 rw_enter(&dn->dn_struct_rwlock, RW_WRITER); in dnode_increase_indirection()
54 ASSERT(dn->dn_phys->dn_type != DMU_OT_NONE); in dnode_increase_indirection()
55 ASSERT(new_level > 1 && dn->dn_phys->dn_nlevels > 0); in dnode_increase_indirection()
57 db = dbuf_hold_level(dn, dn->dn_phys->dn_nlevels, 0, FTAG); in dnode_increase_indirection()
60 dn->dn_phys->dn_nlevels = new_level; in dnode_increase_indirection()
61 dprintf("os=%p obj=%llu, increase to %d\n", dn->dn_objset, in dnode_increase_indirection()
[all …]
H A Ddmu_tx.c43 typedef void (*dmu_tx_hold_func_t)(dmu_tx_t *tx, struct dnode *dn,
113 dmu_tx_hold_dnode_impl(dmu_tx_t *tx, dnode_t *dn, enum dmu_tx_hold_type type, in dmu_tx_hold_dnode_impl() argument
118 if (dn != NULL) { in dmu_tx_hold_dnode_impl()
119 (void) zfs_refcount_add(&dn->dn_holds, tx); in dmu_tx_hold_dnode_impl()
121 mutex_enter(&dn->dn_mtx); in dmu_tx_hold_dnode_impl()
127 ASSERT(dn->dn_assigned_txg == 0); in dmu_tx_hold_dnode_impl()
128 dn->dn_assigned_txg = tx->tx_txg; in dmu_tx_hold_dnode_impl()
129 (void) zfs_refcount_add(&dn->dn_tx_holds, tx); in dmu_tx_hold_dnode_impl()
130 mutex_exit(&dn->dn_mtx); in dmu_tx_hold_dnode_impl()
136 txh->txh_dnode = dn; in dmu_tx_hold_dnode_impl()
[all …]
H A Ddmu.c175 dmu_buf_hold_noread_by_dnode(dnode_t *dn, uint64_t offset, in dmu_buf_hold_noread_by_dnode() argument
181 rw_enter(&dn->dn_struct_rwlock, RW_READER); in dmu_buf_hold_noread_by_dnode()
182 blkid = dbuf_whichblock(dn, 0, offset); in dmu_buf_hold_noread_by_dnode()
183 db = dbuf_hold(dn, blkid, tag); in dmu_buf_hold_noread_by_dnode()
184 rw_exit(&dn->dn_struct_rwlock); in dmu_buf_hold_noread_by_dnode()
199 dnode_t *dn; in dmu_buf_hold_noread() local
204 err = dnode_hold(os, object, FTAG, &dn); in dmu_buf_hold_noread()
207 rw_enter(&dn->dn_struct_rwlock, RW_READER); in dmu_buf_hold_noread()
208 blkid = dbuf_whichblock(dn, 0, offset); in dmu_buf_hold_noread()
209 db = dbuf_hold(dn, blkid, tag); in dmu_buf_hold_noread()
[all …]
H A Ddmu_object.c54 dnode_t *dn = NULL; in dmu_object_alloc_impl() local
183 dn_slots, tag, &dn); in dmu_object_alloc_impl()
185 rw_enter(&dn->dn_struct_rwlock, RW_WRITER); in dmu_object_alloc_impl()
190 if (dn->dn_type == DMU_OT_NONE) { in dmu_object_alloc_impl()
191 dnode_allocate(dn, ot, blocksize, in dmu_object_alloc_impl()
194 rw_exit(&dn->dn_struct_rwlock); in dmu_object_alloc_impl()
195 dmu_tx_add_new_object(tx, dn); in dmu_object_alloc_impl()
202 *allocated_dnode = dn; in dmu_object_alloc_impl()
204 dnode_rele(dn, tag); in dmu_object_alloc_impl()
208 rw_exit(&dn->dn_struct_rwlock); in dmu_object_alloc_impl()
[all …]
H A Ddbuf.c373 dnode_t *dn; in dbuf_find_bonus() local
376 if (dnode_hold(os, object, FTAG, &dn) == 0) { in dbuf_find_bonus()
377 rw_enter(&dn->dn_struct_rwlock, RW_READER); in dbuf_find_bonus()
378 if (dn->dn_bonus != NULL) { in dbuf_find_bonus()
379 db = dn->dn_bonus; in dbuf_find_bonus()
382 rw_exit(&dn->dn_struct_rwlock); in dbuf_find_bonus()
383 dnode_rele(dn, FTAG); in dbuf_find_bonus()
666 dnode_level_is_l2cacheable(blkptr_t *bp, dnode_t *dn, int64_t level) in dnode_level_is_l2cacheable() argument
668 if (dn->dn_objset->os_secondary_cache == ZFS_CACHE_ALL || in dnode_level_is_l2cacheable()
669 (dn->dn_objset->os_secondary_cache == ZFS_CACHE_METADATA && in dnode_level_is_l2cacheable()
[all …]
H A Ddmu_objset.c420 dnode_t *dn = obj; in dnode_multilist_index_func() local
429 return ((unsigned int)dnode_hash(dn->dn_objset, dn->dn_object) % in dnode_multilist_index_func()
951 dnode_t *dn; in dmu_objset_evict_dbufs() local
956 dn = list_head(&os->os_dnodes); in dmu_objset_evict_dbufs()
957 while (dn != NULL) { in dmu_objset_evict_dbufs()
963 if (dnode_add_ref(dn, FTAG)) { in dmu_objset_evict_dbufs()
964 list_insert_after(&os->os_dnodes, dn, dn_marker); in dmu_objset_evict_dbufs()
967 dnode_evict_dbufs(dn); in dmu_objset_evict_dbufs()
968 dnode_rele(dn, FTAG); in dmu_objset_evict_dbufs()
971 dn = list_next(&os->os_dnodes, dn_marker); in dmu_objset_evict_dbufs()
[all …]
H A Ddmu_direct.c209 dmu_write_abd(dnode_t *dn, uint64_t offset, uint64_t size, in dmu_write_abd() argument
213 spa_t *spa = dn->dn_objset->os_spa; in dmu_write_abd()
218 err = dmu_buf_hold_array_by_dnode(dn, offset, in dmu_write_abd()
229 db->db.db_offset - offset, dn->dn_datablksz); in dmu_write_abd()
248 dmu_read_abd(dnode_t *dn, uint64_t offset, uint64_t size, in dmu_read_abd() argument
251 objset_t *os = dn->dn_objset; in dmu_read_abd()
258 err = dmu_buf_hold_array_by_dnode(dn, offset, in dmu_read_abd()
353 dmu_read_uio_direct(dnode_t *dn, zfs_uio_t *uio, uint64_t size) in dmu_read_uio_direct() argument
364 err = dmu_read_abd(dn, offset, size, data, DMU_DIRECTIO); in dmu_read_uio_direct()
374 dmu_write_uio_direct(dnode_t *dn, zfs_uio_t *uio, uint64_t size, dmu_tx_t *tx) in dmu_write_uio_direct() argument
[all …]
/freebsd/sys/contrib/openzfs/include/os/linux/zfs/sys/
H A Dtrace_dnode.h47 TP_PROTO(dnode_t *dn, int64_t refcount, uint32_t dbufs),
48 TP_ARGS(dn, refcount, dbufs),
72 __entry->dn_object = dn->dn_object;
73 __entry->dn_type = dn->dn_type;
74 __entry->dn_bonuslen = dn->dn_bonuslen;
75 __entry->dn_bonustype = dn->dn_bonustype;
76 __entry->dn_nblkptr = dn->dn_nblkptr;
77 __entry->dn_checksum = dn->dn_checksum;
78 __entry->dn_compress = dn->dn_compress;
79 __entry->dn_nlevels = dn->dn_nlevels;
[all …]
/freebsd/sys/contrib/openzfs/include/sys/
H A Ddnode.h107 #define DN_SLOT_IS_PTR(dn) ((void *)dn > DN_SLOT_INTERIOR) argument
108 #define DN_SLOT_IS_VALID(dn) ((void *)dn != NULL) argument
392 #define DN_DBUFS_COUNT(dn) ((dn)->dn_dbufs_count + \ argument
393 avl_numnodes(&(dn)->dn_dbufs))
428 void dnode_setbonuslen(dnode_t *dn, int newsize, dmu_tx_t *tx);
429 void dnode_setbonus_type(dnode_t *dn, dmu_object_type_t, dmu_tx_t *tx);
430 void dnode_rm_spill(dnode_t *dn, dmu_tx_t *tx);
436 boolean_t dnode_add_ref(dnode_t *dn, const void *ref);
437 void dnode_rele(dnode_t *dn, const void *ref);
438 void dnode_rele_and_unlock(dnode_t *dn, const void *tag, boolean_t evicting);
[all …]
H A Ddbuf.h360 void dbuf_create_bonus(struct dnode *dn);
363 void dbuf_rm_spill(struct dnode *dn, dmu_tx_t *tx);
365 dmu_buf_impl_t *dbuf_hold(struct dnode *dn, uint64_t blkid, const void *tag);
366 dmu_buf_impl_t *dbuf_hold_level(struct dnode *dn, int level, uint64_t blkid,
368 int dbuf_hold_impl(struct dnode *dn, uint8_t level, uint64_t blkid,
372 int dbuf_prefetch_impl(struct dnode *dn, int64_t level, uint64_t blkid,
375 int dbuf_prefetch(struct dnode *dn, int64_t level, uint64_t blkid,
397 dbuf_dirty_record_t *dbuf_dirty_lightweight(dnode_t *dn, uint64_t blkid,
407 int dmu_lightweight_write_by_dnode(dnode_t *dn, uint64_t offset, abd_t *abd,
421 void dbuf_free_range(struct dnode *dn, uint64_t start, uint64_t end,
[all …]
H A Ddmu.h530 void dmu_write_policy(objset_t *os, dnode_t *dn, int level, int wp,
547 int dmu_bonus_hold_by_dnode(dnode_t *dn, const void *tag, dmu_buf_t **dbp,
561 int dmu_spill_hold_by_dnode(dnode_t *dn, uint32_t flags,
586 int dmu_buf_hold_by_dnode(dnode_t *dn, uint64_t offset,
588 int dmu_buf_hold_array_by_dnode(dnode_t *dn, uint64_t offset,
591 int dmu_buf_hold_noread_by_dnode(dnode_t *dn, uint64_t offset, const void *tag,
809 void dmu_tx_hold_write_by_dnode(dmu_tx_t *tx, dnode_t *dn, uint64_t off,
812 void dmu_tx_hold_append_by_dnode(dmu_tx_t *tx, dnode_t *dn, uint64_t off,
814 void dmu_tx_hold_clone_by_dnode(dmu_tx_t *tx, dnode_t *dn, uint64_t off,
818 void dmu_tx_hold_free_by_dnode(dmu_tx_t *tx, dnode_t *dn, uint64_t off,
[all …]
/freebsd/lib/libc/nameser/
H A Dns_name.c98 char *dn, *eom; in ns_name_ntop() local
104 dn = dst; in ns_name_ntop()
113 if (dn != dst) { in ns_name_ntop()
114 if (dn >= eom) { in ns_name_ntop()
118 *dn++ = '.'; in ns_name_ntop()
124 if (dn + l >= eom) { in ns_name_ntop()
136 if ((m = decode_bitstring(&cp, dn, eom)) < 0) in ns_name_ntop()
141 dn += m; in ns_name_ntop()
147 if (dn + 1 >= eom) { in ns_name_ntop()
151 *dn++ = '\\'; in ns_name_ntop()
[all …]
/freebsd/sys/fs/msdosfs/
H A Dmsdosfs_conv.c238 dos2unixfn(u_char dn[11], u_char *un, int lower, struct msdosfsmount *pmp) in dos2unixfn()
250 if (*dn == SLOT_E5) in dos2unixfn()
251 *dn = 0xe5; in dos2unixfn()
256 for (i = 8; i > 0 && *dn != ' ';) { in dos2unixfn()
257 c = dos2unixchr(tmpbuf, __DECONST(const u_char **, &dn), &i, in dos2unixfn()
264 dn += i; in dos2unixfn()
270 if (*dn != ' ') { in dos2unixfn()
273 for (i = 3; i > 0 && *dn != ' ';) { in dos2unixfn()
274 c = dos2unixchr(tmpbuf, __DECONST(const u_char **, &dn), in dos2unixfn()
299 unix2dosfn(const u_char *un, u_char dn[12], size_t unlen, u_int gen, in unix2dosfn()
[all …]
/freebsd/lib/libc/resolv/
H A Dres_comp.c153 res_hnok(const char *dn) { in res_hnok() argument
154 int pch = PERIOD, ch = *dn++; in res_hnok()
157 int nch = *dn++; in res_hnok()
181 res_ownok(const char *dn) { in res_ownok() argument
182 if (asterchar(dn[0])) { in res_ownok()
183 if (periodchar(dn[1])) in res_ownok()
184 return (res_hnok(dn+2)); in res_ownok()
185 if (dn[1] == '\0') in res_ownok()
188 return (res_hnok(dn)); in res_ownok()
196 res_mailok(const char *dn) { in res_mailok() argument
[all …]
/freebsd/contrib/llvm-project/openmp/runtime/src/
H A Dkmp_taskdeps.h18 #define KMP_ACQUIRE_DEPNODE(gtid, n) __kmp_acquire_lock(&(n)->dn.lock, (gtid))
19 #define KMP_RELEASE_DEPNODE(gtid, n) __kmp_release_lock(&(n)->dn.lock, (gtid))
25 kmp_int32 n = KMP_ATOMIC_DEC(&node->dn.nrefs) - 1; in __kmp_node_deref()
31 KMP_ASSERT(node->dn.nrefs == 0); in __kmp_node_deref()
116 if (UNLIKELY(node && (node->dn.mtx_num_locks < 0))) { in __kmp_release_deps()
118 node->dn.mtx_num_locks = -node->dn.mtx_num_locks; in __kmp_release_deps()
119 for (int i = node->dn.mtx_num_locks - 1; i >= 0; --i) { in __kmp_release_deps()
120 KMP_DEBUG_ASSERT(node->dn.mtx_locks[i] != NULL); in __kmp_release_deps()
121 __kmp_release_lock(node->dn.mtx_locks[i], gtid); in __kmp_release_deps()
144 node->dn.task = in __kmp_release_deps()
[all …]
H A Dkmp_taskdeps.cpp37 node->dn.successors = NULL; in __kmp_init_node()
38 node->dn.task = NULL; // will point to the right task in __kmp_init_node()
41 node->dn.mtx_locks[i] = NULL; in __kmp_init_node()
42 node->dn.mtx_num_locks = 0; in __kmp_init_node()
43 __kmp_init_lock(&node->dn.lock); in __kmp_init_node()
44 KMP_ATOMIC_ST_RLX(&node->dn.nrefs, 1); // init creates the first reference in __kmp_init_node()
46 node->dn.id = KMP_ATOMIC_INC(&kmp_node_id_seed); in __kmp_init_node()
54 KMP_ATOMIC_INC(&node->dn.nrefs); in __kmp_node_ref()
222 kmp_taskdata_t *task_source = KMP_TASK_TO_TASKDATA(source->dn.task); in __kmp_track_dependence()
224 if (source->dn.task && sink_task) { in __kmp_track_dependence()
[all …]
/freebsd/usr.sbin/makefs/msdos/
H A Dmsdosfs_conv.c296 unix2dosfn(const u_char *un, u_char dn[12], size_t unlen, u_int gen) in unix2dosfn()
309 dn[i] = ' '; in unix2dosfn()
310 dn[11] = 0; in unix2dosfn()
317 dn[0] = '.'; in unix2dosfn()
321 dn[0] = '.'; in unix2dosfn()
322 dn[1] = '.'; in unix2dosfn()
366 if (dp[i] != (dn[j] = unix2dos[dp[i]]) in unix2dosfn()
369 if (!dn[j]) { in unix2dosfn()
371 dn[j--] = ' '; in unix2dosfn()
389 dn[j] = ' '; in unix2dosfn()
[all …]
/freebsd/usr.bin/tip/libacu/
H A Ddn11.c41 static pid_t child = -1, dn; variable
54 if ((dn = open(acu, 1)) < 0) { in dn_dialer()
63 close(dn); in dn_dialer()
77 nw = write(dn, num, lt = strlen(num)); in dn_dialer()
90 close(dn); in dn_dialer()
94 tcgetattr(dn, &cntrl); in dn_dialer()
96 tcsetattr(dn, TCSANOW, &cntrl); in dn_dialer()
101 close(dn); in dn_dialer()
136 if (dn > 0) in dn_abort()
137 close(dn); in dn_abort()
/freebsd/crypto/heimdal/lib/gssapi/ntlm/
H A Diter_cred.c65 ntlm_cred dn; in _gss_ntlm_iter_creds_f() local
80 dn = calloc(1, sizeof(*dn)); in _gss_ntlm_iter_creds_f()
81 if (dn == NULL) { in _gss_ntlm_iter_creds_f()
86 dn->username = user; in _gss_ntlm_iter_creds_f()
87 dn->domain = domain; in _gss_ntlm_iter_creds_f()
89 cred_iter(userctx, GSS_NTLM_MECHANISM, (gss_cred_id_t)dn); in _gss_ntlm_iter_creds_f()
/freebsd/sys/dev/proto/
H A Dproto_core.c122 const char *dn, *ep, *ev; in proto_probe() local
131 dn = ev; in proto_probe()
132 while (*dn != '\0') { in proto_probe()
133 ep = dn; in proto_probe()
136 if ((ep - dn) > pfxlen && in proto_probe()
137 strncmp(dn, prefix, pfxlen) == 0) in proto_probe()
139 dn = (*ep == ',') ? ep + 1 : ep; in proto_probe()
146 dn = ev; in proto_probe()
148 while (*dn != '\0') { in proto_probe()
149 ep = dn; in proto_probe()
[all …]
/freebsd/sys/kern/
H A Dsubr_pcpu.c199 struct dpcpu_free *dn; in dpcpu_free() local
220 dn = TAILQ_NEXT(df, df_link); in dpcpu_free()
221 if (df->df_start + df->df_len == dn->df_start) { in dpcpu_free()
222 df->df_len += dn->df_len; in dpcpu_free()
223 TAILQ_REMOVE(&dpcpu_head, dn, df_link); in dpcpu_free()
224 free(dn, M_PCPU); in dpcpu_free()
236 dn = malloc(sizeof(*df), M_PCPU, M_WAITOK | M_ZERO); in dpcpu_free()
237 dn->df_start = start; in dpcpu_free()
238 dn->df_len = size; in dpcpu_free()
240 TAILQ_INSERT_BEFORE(df, dn, df_link); in dpcpu_free()
[all …]
/freebsd/tools/tools/zfsboottest/
H A Dzfsboottest.c86 zfs_read(spa_t *spa, dnode_phys_t *dn, void *buf, size_t size, off_t off) in zfs_read() argument
88 const znode_phys_t *zp = (const znode_phys_t *) dn->dn_bonus; in zfs_read()
96 rc = dnode_read(spa, dn, off, buf, n); in zfs_read()
110 dnode_phys_t dn; local
187 if (zfs_lookup(&zfsmnt, argv[i], &dn)) {
193 if (zfs_dnode_stat(spa, &dn, &sb)) {
204 n = zfs_read(spa, &dn, buf, n, off);
/freebsd/contrib/tcsh/
H A Dsh.dir.c1198 struct directory *dn; in dnewcwd() local
1200 for (dn = dhead.di_prev; dn != &dhead; dn = dn->di_prev) in dnewcwd()
1201 if (dn != dp && Strcmp(dn->di_name, dp->di_name) == 0) { in dnewcwd()
1202 dn->di_next->di_prev = dn->di_prev; in dnewcwd()
1203 dn->di_prev->di_next = dn->di_next; in dnewcwd()
1204 dfree(dn); in dnewcwd()
1228 struct directory *dn, *dp; in dsetstack() local
1234 while ((dn = dhead.di_prev) != &dhead) { in dsetstack()
1235 dn->di_next->di_prev = dn->di_prev; in dsetstack()
1236 dn->di_prev->di_next = dn->di_next; in dsetstack()
[all …]
/freebsd/lib/libcalendar/
H A Deaster.c86 int dn; in easterodn() local
99 dn = ndaysj(&dt); in easterodn()
100 return (dn + ns[weekday(dn)]); in easterodn()

12345