Lines Matching refs:dnp
645 dnode_phys_t *dnp = dn->dn_phys; in dnode_sync() local
652 ASSERT(dnp->dn_type != DMU_OT_NONE || dn->dn_allocated_txg); in dnode_sync()
653 ASSERT(dnp->dn_type != DMU_OT_NONE || in dnode_sync()
654 memcmp(dnp, &zerodn, DNODE_MIN_SIZE) == 0); in dnode_sync()
691 if (dnp->dn_type == DMU_OT_NONE) { in dnode_sync()
693 dnp->dn_nlevels = 1; in dnode_sync()
694 dnp->dn_nblkptr = dn->dn_nblkptr; in dnode_sync()
697 dnp->dn_type = dn->dn_type; in dnode_sync()
698 dnp->dn_bonustype = dn->dn_bonustype; in dnode_sync()
699 dnp->dn_bonuslen = dn->dn_bonuslen; in dnode_sync()
702 dnp->dn_extra_slots = dn->dn_num_slots - 1; in dnode_sync()
704 ASSERT(dnp->dn_nlevels > 1 || in dnode_sync()
705 BP_IS_HOLE(&dnp->dn_blkptr[0]) || in dnode_sync()
706 BP_IS_EMBEDDED(&dnp->dn_blkptr[0]) || in dnode_sync()
707 BP_GET_LSIZE(&dnp->dn_blkptr[0]) == in dnode_sync()
708 dnp->dn_datablkszsec << SPA_MINBLOCKSHIFT); in dnode_sync()
709 ASSERT(dnp->dn_nlevels < 2 || in dnode_sync()
710 BP_IS_HOLE(&dnp->dn_blkptr[0]) || in dnode_sync()
711 BP_GET_LSIZE(&dnp->dn_blkptr[0]) == 1 << dnp->dn_indblkshift); in dnode_sync()
714 dnp->dn_type = dn->dn_type; in dnode_sync()
721 ASSERT(BP_IS_HOLE(&dnp->dn_blkptr[0]) || in dnode_sync()
724 dnp->dn_datablkszsec || in dnode_sync()
726 dnp->dn_datablkszsec = in dnode_sync()
733 dnp->dn_bonuslen = 0; in dnode_sync()
735 dnp->dn_bonuslen = dn->dn_next_bonuslen[txgoff]; in dnode_sync()
736 ASSERT(dnp->dn_bonuslen <= in dnode_sync()
737 DN_SLOTS_TO_BONUSLEN(dnp->dn_extra_slots + 1)); in dnode_sync()
743 dnp->dn_bonustype = dn->dn_next_bonustype[txgoff]; in dnode_sync()
755 if (dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR) in dnode_sync()
761 ASSERT(dnp->dn_nlevels == 1); in dnode_sync()
762 dnp->dn_indblkshift = dn->dn_next_indblkshift[txgoff]; in dnode_sync()
771 dnp->dn_checksum = dn->dn_checksum; in dnode_sync()
772 dnp->dn_compress = dn->dn_compress; in dnode_sync()
779 dnp->dn_flags &= ~DNODE_FLAG_SPILL_BLKPTR; in dnode_sync()
837 dnp->dn_maxblkid = in dnode_sync()
846 if (dn->dn_next_nblkptr[txgoff] > dnp->dn_nblkptr) { in dnode_sync()
848 memset(dnp->dn_blkptr + dnp->dn_nblkptr, 0, in dnode_sync()
850 (dn->dn_next_nblkptr[txgoff] - dnp->dn_nblkptr)); in dnode_sync()
854 ASSERT(dn->dn_next_nblkptr[txgoff] < dnp->dn_nblkptr); in dnode_sync()
856 for (i = 0; i < dnp->dn_nblkptr; i++) { in dnode_sync()
858 ASSERT(BP_IS_HOLE(&dnp->dn_blkptr[i])); in dnode_sync()
863 dnp->dn_nblkptr = dn->dn_next_nblkptr[txgoff]; in dnode_sync()
875 ASSERT3U(dnp->dn_bonuslen, <=, DN_MAX_BONUS_LEN(dnp)); in dnode_sync()