Lines Matching refs:dnp
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()
342 ASSERT(dnp->dn_nblkptr <= DN_MAX_NBLKPTR); in dnode_byteswap()
343 for (i = 0; i < dnp->dn_nblkptr * sizeof (blkptr_t)/8; i++) in dnode_byteswap()
351 if (dnp->dn_bonuslen != 0) { in dnode_byteswap()
353 ASSERT(DMU_OT_IS_VALID(dnp->dn_bonustype)); in dnode_byteswap()
354 byteswap = DMU_OT_BYTESWAP(dnp->dn_bonustype); in dnode_byteswap()
355 dmu_ot_byteswap[byteswap].ob_func(DN_BONUS(dnp), in dnode_byteswap()
356 DN_MAX_BONUS_LEN(dnp)); in dnode_byteswap()
360 if (dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR) in dnode_byteswap()
361 byteswap_uint64_array(DN_SPILL_BLKPTR(dnp), sizeof (blkptr_t)); in dnode_byteswap()
374 dnode_phys_t *dnp = (void *)(((char *)vbuf) + i); in dnode_buf_byteswap() local
375 dnode_byteswap(dnp); in dnode_buf_byteswap()
378 if (dnp->dn_type != DMU_OT_NONE) in dnode_buf_byteswap()
379 i += dnp->dn_extra_slots * DNODE_MIN_SIZE; in dnode_buf_byteswap()
435 dnode_create(objset_t *os, dnode_phys_t *dnp, dmu_buf_impl_t *db, in dnode_create() argument
453 dn->dn_phys = dnp; in dnode_create()
455 if (dnp->dn_datablkszsec) { in dnode_create()
456 dnode_setdblksz(dn, dnp->dn_datablkszsec << SPA_MINBLOCKSHIFT); in dnode_create()
462 dn->dn_indblkshift = dnp->dn_indblkshift; in dnode_create()
463 dn->dn_nlevels = dnp->dn_nlevels; in dnode_create()
464 dn->dn_type = dnp->dn_type; in dnode_create()
465 dn->dn_nblkptr = dnp->dn_nblkptr; in dnode_create()
466 dn->dn_checksum = dnp->dn_checksum; in dnode_create()
467 dn->dn_compress = dnp->dn_compress; in dnode_create()
468 dn->dn_bonustype = dnp->dn_bonustype; in dnode_create()
469 dn->dn_bonuslen = dnp->dn_bonuslen; in dnode_create()
470 dn->dn_num_slots = dnp->dn_extra_slots + 1; in dnode_create()
471 dn->dn_maxblkid = dnp->dn_maxblkid; in dnode_create()
472 dn->dn_have_spill = ((dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR) != 0); in dnode_create()
1192 dnode_special_open(objset_t *os, dnode_phys_t *dnp, uint64_t object, in dnode_special_open() argument
1200 dn = dnode_create(os, dnp, NULL, object, dnh); in dnode_special_open()
1277 void *tag, dnode_t **dnp) in dnode_hold_impl() argument
1291 IMPLY(flag & DNODE_DRY_RUN, (tag == NULL) && (dnp == NULL)); in dnode_hold_impl()
1324 *dnp = dn; in dnode_hold_impl()
1556 *dnp = dn; in dnode_hold_impl()
1564 dnode_hold(objset_t *os, uint64_t object, void *tag, dnode_t **dnp) in dnode_hold() argument
1567 dnp)); in dnode_hold()
2377 dnode_phys_t *dnp = data; in dnode_next_offset_level() local
2383 i < blkfill; i += dnp[i].dn_extra_slots + 1) { in dnode_next_offset_level()
2384 if ((dnp[i].dn_type == DMU_OT_NONE) == hole) in dnode_next_offset_level()