Lines Matching refs:dnp
441 dnode_byteswap(dnode_phys_t *dnp) in dnode_byteswap() argument
443 uint64_t *buf64 = (void*)&dnp->dn_blkptr; in dnode_byteswap()
446 if (dnp->dn_type == DMU_OT_NONE) { in dnode_byteswap()
447 memset(dnp, 0, sizeof (dnode_phys_t)); in dnode_byteswap()
451 dnp->dn_datablkszsec = BSWAP_16(dnp->dn_datablkszsec); in dnode_byteswap()
452 dnp->dn_bonuslen = BSWAP_16(dnp->dn_bonuslen); in dnode_byteswap()
453 dnp->dn_extra_slots = BSWAP_8(dnp->dn_extra_slots); in dnode_byteswap()
454 dnp->dn_maxblkid = BSWAP_64(dnp->dn_maxblkid); in dnode_byteswap()
455 dnp->dn_used = BSWAP_64(dnp->dn_used); in dnode_byteswap()
461 ASSERT(dnp->dn_indblkshift <= SPA_MAXBLOCKSHIFT); in dnode_byteswap()
462 ASSERT(dnp->dn_nblkptr <= DN_MAX_NBLKPTR); in dnode_byteswap()
463 for (i = 0; i < dnp->dn_nblkptr * sizeof (blkptr_t)/8; i++) in dnode_byteswap()
471 if (dnp->dn_bonuslen != 0) { in dnode_byteswap()
473 ASSERT(DMU_OT_IS_VALID(dnp->dn_bonustype)); in dnode_byteswap()
474 byteswap = DMU_OT_BYTESWAP(dnp->dn_bonustype); in dnode_byteswap()
475 dmu_ot_byteswap[byteswap].ob_func(DN_BONUS(dnp), in dnode_byteswap()
476 DN_MAX_BONUS_LEN(dnp)); in dnode_byteswap()
480 if (dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR) in dnode_byteswap()
481 byteswap_uint64_array(DN_SPILL_BLKPTR(dnp), sizeof (blkptr_t)); in dnode_byteswap()
493 dnode_phys_t *dnp = (void *)(((char *)vbuf) + i); in dnode_buf_byteswap() local
494 dnode_byteswap(dnp); in dnode_buf_byteswap()
497 if (dnp->dn_type != DMU_OT_NONE) in dnode_buf_byteswap()
498 i += dnp->dn_extra_slots * DNODE_MIN_SIZE; in dnode_buf_byteswap()
562 dnode_create(objset_t *os, dnode_phys_t *dnp, dmu_buf_impl_t *db, in dnode_create() argument
577 dn->dn_phys = dnp; in dnode_create()
579 if (dnp->dn_datablkszsec) { in dnode_create()
580 dnode_setdblksz(dn, dnp->dn_datablkszsec << SPA_MINBLOCKSHIFT); in dnode_create()
586 dn->dn_indblkshift = dnp->dn_indblkshift; in dnode_create()
587 dn->dn_nlevels = dnp->dn_nlevels; in dnode_create()
588 dn->dn_type = dnp->dn_type; in dnode_create()
589 dn->dn_nblkptr = dnp->dn_nblkptr; in dnode_create()
590 dn->dn_checksum = dnp->dn_checksum; in dnode_create()
591 dn->dn_compress = dnp->dn_compress; in dnode_create()
592 dn->dn_bonustype = dnp->dn_bonustype; in dnode_create()
593 dn->dn_bonuslen = dnp->dn_bonuslen; in dnode_create()
594 dn->dn_num_slots = dnp->dn_extra_slots + 1; in dnode_create()
595 dn->dn_maxblkid = dnp->dn_maxblkid; in dnode_create()
596 dn->dn_have_spill = ((dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR) != 0); in dnode_create()
1303 dnode_special_open(objset_t *os, dnode_phys_t *dnp, uint64_t object, in dnode_special_open() argument
1311 dn = dnode_create(os, dnp, NULL, object, dnh); in dnode_special_open()
1389 const void *tag, dnode_t **dnp) in dnode_hold_impl() argument
1403 IMPLY(flag & DNODE_DRY_RUN, (tag == NULL) && (dnp == NULL)); in dnode_hold_impl()
1436 *dnp = dn; in dnode_hold_impl()
1670 ASSERT3P(dnp, !=, NULL); in dnode_hold_impl()
1675 *dnp = dn; in dnode_hold_impl()
1683 dnode_hold(objset_t *os, uint64_t object, const void *tag, dnode_t **dnp) in dnode_hold() argument
1686 dnp)); in dnode_hold()
2546 dnode_phys_t *dnp = data; in dnode_next_offset_level() local
2552 i < blkfill; i += dnp[i].dn_extra_slots + 1) { in dnode_next_offset_level()
2553 if ((dnp[i].dn_type == DMU_OT_NONE) == hole) in dnode_next_offset_level()