Lines Matching defs:dnp

449 dnode_byteswap(dnode_phys_t *dnp)
451 uint64_t *buf64 = (void*)&dnp->dn_blkptr;
454 if (dnp->dn_type == DMU_OT_NONE) {
455 memset(dnp, 0, sizeof (dnode_phys_t));
459 dnp->dn_datablkszsec = BSWAP_16(dnp->dn_datablkszsec);
460 dnp->dn_bonuslen = BSWAP_16(dnp->dn_bonuslen);
461 dnp->dn_extra_slots = BSWAP_8(dnp->dn_extra_slots);
462 dnp->dn_maxblkid = BSWAP_64(dnp->dn_maxblkid);
463 dnp->dn_used = BSWAP_64(dnp->dn_used);
469 ASSERT(dnp->dn_indblkshift <= SPA_MAXBLOCKSHIFT);
470 ASSERT(dnp->dn_nblkptr <= DN_MAX_NBLKPTR);
471 for (i = 0; i < dnp->dn_nblkptr * sizeof (blkptr_t)/8; i++)
479 if (dnp->dn_bonuslen != 0) {
481 ASSERT(DMU_OT_IS_VALID(dnp->dn_bonustype));
482 byteswap = DMU_OT_BYTESWAP(dnp->dn_bonustype);
483 dmu_ot_byteswap[byteswap].ob_func(DN_BONUS(dnp),
484 DN_MAX_BONUS_LEN(dnp));
488 if (dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR)
489 byteswap_uint64_array(DN_SPILL_BLKPTR(dnp), sizeof (blkptr_t));
501 dnode_phys_t *dnp = (void *)(((char *)vbuf) + i);
502 dnode_byteswap(dnp);
505 if (dnp->dn_type != DMU_OT_NONE)
506 i += dnp->dn_extra_slots * DNODE_MIN_SIZE;
581 dnode_create(objset_t *os, dnode_phys_t *dnp, dmu_buf_impl_t *db,
596 dn->dn_phys = dnp;
598 if (dnp->dn_datablkszsec) {
599 dnode_setdblksz(dn, dnp->dn_datablkszsec << SPA_MINBLOCKSHIFT);
605 dn->dn_indblkshift = dnp->dn_indblkshift;
606 dn->dn_nlevels = dnp->dn_nlevels;
607 dn->dn_type = dnp->dn_type;
608 dn->dn_nblkptr = dnp->dn_nblkptr;
609 dn->dn_checksum = dnp->dn_checksum;
610 dn->dn_compress = dnp->dn_compress;
611 dn->dn_bonustype = dnp->dn_bonustype;
612 dn->dn_bonuslen = dnp->dn_bonuslen;
613 dn->dn_num_slots = dnp->dn_extra_slots + 1;
614 dn->dn_maxblkid = dnp->dn_maxblkid;
615 dn->dn_have_spill = ((dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR) != 0);
1347 dnode_special_open(objset_t *os, dnode_phys_t *dnp, uint64_t object,
1355 dn = dnode_create(os, dnp, NULL, object, dnh);
1416 * return whether the hold would succeed or not. tag and dnp should set to
1433 const void *tag, dnode_t **dnp)
1447 IMPLY(flag & DNODE_DRY_RUN, (tag == NULL) && (dnp == NULL));
1480 *dnp = dn;
1722 ASSERT3P(dnp, !=, NULL);
1727 *dnp = dn;
1735 dnode_hold(objset_t *os, uint64_t object, const void *tag, dnode_t **dnp)
1738 dnp));
2497 dprintf_dnode(dn, "dn=%p dnp=%p used=%llu delta=%lld\n",
2598 dnode_phys_t *dnp = data;
2604 i < blkfill; i += dnp[i].dn_extra_slots + 1) {
2605 if ((dnp[i].dn_type == DMU_OT_NONE) == hole)