Lines Matching refs:dnp
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()
470 ASSERT(dnp->dn_nblkptr <= DN_MAX_NBLKPTR); in dnode_byteswap()
471 for (i = 0; i < dnp->dn_nblkptr * sizeof (blkptr_t)/8; i++) in dnode_byteswap()
479 if (dnp->dn_bonuslen != 0) { in dnode_byteswap()
481 ASSERT(DMU_OT_IS_VALID(dnp->dn_bonustype)); in dnode_byteswap()
482 byteswap = DMU_OT_BYTESWAP(dnp->dn_bonustype); in dnode_byteswap()
483 dmu_ot_byteswap[byteswap].ob_func(DN_BONUS(dnp), in dnode_byteswap()
484 DN_MAX_BONUS_LEN(dnp)); in dnode_byteswap()
488 if (dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR) in dnode_byteswap()
489 byteswap_uint64_array(DN_SPILL_BLKPTR(dnp), sizeof (blkptr_t)); in dnode_byteswap()
501 dnode_phys_t *dnp = (void *)(((char *)vbuf) + i); in dnode_buf_byteswap() local
502 dnode_byteswap(dnp); in dnode_buf_byteswap()
505 if (dnp->dn_type != DMU_OT_NONE) in dnode_buf_byteswap()
506 i += dnp->dn_extra_slots * DNODE_MIN_SIZE; in dnode_buf_byteswap()
581 dnode_create(objset_t *os, dnode_phys_t *dnp, dmu_buf_impl_t *db, in dnode_create() argument
596 dn->dn_phys = dnp; in dnode_create()
598 if (dnp->dn_datablkszsec) { in dnode_create()
599 dnode_setdblksz(dn, dnp->dn_datablkszsec << SPA_MINBLOCKSHIFT); in dnode_create()
605 dn->dn_indblkshift = dnp->dn_indblkshift; in dnode_create()
606 dn->dn_nlevels = dnp->dn_nlevels; in dnode_create()
607 dn->dn_type = dnp->dn_type; in dnode_create()
608 dn->dn_nblkptr = dnp->dn_nblkptr; in dnode_create()
609 dn->dn_checksum = dnp->dn_checksum; in dnode_create()
610 dn->dn_compress = dnp->dn_compress; in dnode_create()
611 dn->dn_bonustype = dnp->dn_bonustype; in dnode_create()
612 dn->dn_bonuslen = dnp->dn_bonuslen; in dnode_create()
613 dn->dn_num_slots = dnp->dn_extra_slots + 1; in dnode_create()
614 dn->dn_maxblkid = dnp->dn_maxblkid; in dnode_create()
615 dn->dn_have_spill = ((dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR) != 0); in dnode_create()
1347 dnode_special_open(objset_t *os, dnode_phys_t *dnp, uint64_t object, in dnode_special_open() argument
1355 dn = dnode_create(os, dnp, NULL, object, dnh); in dnode_special_open()
1433 const void *tag, dnode_t **dnp) in dnode_hold_impl() argument
1447 IMPLY(flag & DNODE_DRY_RUN, (tag == NULL) && (dnp == NULL)); in dnode_hold_impl()
1480 *dnp = dn; in dnode_hold_impl()
1722 ASSERT3P(dnp, !=, NULL); in dnode_hold_impl()
1727 *dnp = dn; in dnode_hold_impl()
1735 dnode_hold(objset_t *os, uint64_t object, const void *tag, dnode_t **dnp) in dnode_hold() argument
1738 dnp)); in dnode_hold()
2598 dnode_phys_t *dnp = data; in dnode_next_offset_level() local
2604 i < blkfill; i += dnp[i].dn_extra_slots + 1) { in dnode_next_offset_level()
2605 if ((dnp[i].dn_type == DMU_OT_NONE) == hole) in dnode_next_offset_level()