Lines Matching refs:dnp
635 dnode_phys_t *dnp = dn->dn_phys; in dnode_sync() local
642 ASSERT(dnp->dn_type != DMU_OT_NONE || dn->dn_allocated_txg); in dnode_sync()
643 ASSERT(dnp->dn_type != DMU_OT_NONE || in dnode_sync()
644 memcmp(dnp, &zerodn, DNODE_MIN_SIZE) == 0); in dnode_sync()
681 if (dnp->dn_type == DMU_OT_NONE) { in dnode_sync()
683 dnp->dn_nlevels = 1; in dnode_sync()
684 dnp->dn_nblkptr = dn->dn_nblkptr; in dnode_sync()
687 dnp->dn_type = dn->dn_type; in dnode_sync()
688 dnp->dn_bonustype = dn->dn_bonustype; in dnode_sync()
689 dnp->dn_bonuslen = dn->dn_bonuslen; in dnode_sync()
692 dnp->dn_extra_slots = dn->dn_num_slots - 1; in dnode_sync()
694 ASSERT(dnp->dn_nlevels > 1 || in dnode_sync()
695 BP_IS_HOLE(&dnp->dn_blkptr[0]) || in dnode_sync()
696 BP_IS_EMBEDDED(&dnp->dn_blkptr[0]) || in dnode_sync()
697 BP_GET_LSIZE(&dnp->dn_blkptr[0]) == in dnode_sync()
698 dnp->dn_datablkszsec << SPA_MINBLOCKSHIFT); in dnode_sync()
699 ASSERT(dnp->dn_nlevels < 2 || in dnode_sync()
700 BP_IS_HOLE(&dnp->dn_blkptr[0]) || in dnode_sync()
701 BP_GET_LSIZE(&dnp->dn_blkptr[0]) == 1 << dnp->dn_indblkshift); in dnode_sync()
704 dnp->dn_type = dn->dn_type; in dnode_sync()
711 ASSERT(BP_IS_HOLE(&dnp->dn_blkptr[0]) || in dnode_sync()
714 dnp->dn_datablkszsec || in dnode_sync()
716 dnp->dn_datablkszsec = in dnode_sync()
723 dnp->dn_bonuslen = 0; in dnode_sync()
725 dnp->dn_bonuslen = dn->dn_next_bonuslen[txgoff]; in dnode_sync()
726 ASSERT(dnp->dn_bonuslen <= in dnode_sync()
727 DN_SLOTS_TO_BONUSLEN(dnp->dn_extra_slots + 1)); in dnode_sync()
733 dnp->dn_bonustype = dn->dn_next_bonustype[txgoff]; in dnode_sync()
745 if (dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR) in dnode_sync()
751 ASSERT(dnp->dn_nlevels == 1); in dnode_sync()
752 dnp->dn_indblkshift = dn->dn_next_indblkshift[txgoff]; in dnode_sync()
761 dnp->dn_checksum = dn->dn_checksum; in dnode_sync()
762 dnp->dn_compress = dn->dn_compress; in dnode_sync()
769 dnp->dn_flags &= ~DNODE_FLAG_SPILL_BLKPTR; in dnode_sync()
826 dnp->dn_maxblkid = in dnode_sync()
835 if (dn->dn_next_nblkptr[txgoff] > dnp->dn_nblkptr) { in dnode_sync()
837 memset(dnp->dn_blkptr + dnp->dn_nblkptr, 0, in dnode_sync()
839 (dn->dn_next_nblkptr[txgoff] - dnp->dn_nblkptr)); in dnode_sync()
843 ASSERT(dn->dn_next_nblkptr[txgoff] < dnp->dn_nblkptr); in dnode_sync()
845 for (i = 0; i < dnp->dn_nblkptr; i++) { in dnode_sync()
847 ASSERT(BP_IS_HOLE(&dnp->dn_blkptr[i])); in dnode_sync()
852 dnp->dn_nblkptr = dn->dn_next_nblkptr[txgoff]; in dnode_sync()
864 ASSERT3U(dnp->dn_bonuslen, <=, DN_MAX_BONUS_LEN(dnp)); in dnode_sync()