Lines Matching refs:odn

701 dnode_move_impl(dnode_t *odn, dnode_t *ndn)
705 ASSERT(!RW_LOCK_HELD(&odn->dn_struct_rwlock));
706 ASSERT(MUTEX_NOT_HELD(&odn->dn_mtx));
707 ASSERT(MUTEX_NOT_HELD(&odn->dn_dbufs_mtx));
708 ASSERT(!RW_LOCK_HELD(&odn->dn_zfetch.zf_rwlock));
711 ndn->dn_objset = odn->dn_objset;
712 ndn->dn_object = odn->dn_object;
713 ndn->dn_dbuf = odn->dn_dbuf;
714 ndn->dn_handle = odn->dn_handle;
715 ndn->dn_phys = odn->dn_phys;
716 ndn->dn_type = odn->dn_type;
717 ndn->dn_bonuslen = odn->dn_bonuslen;
718 ndn->dn_bonustype = odn->dn_bonustype;
719 ndn->dn_nblkptr = odn->dn_nblkptr;
720 ndn->dn_checksum = odn->dn_checksum;
721 ndn->dn_compress = odn->dn_compress;
722 ndn->dn_nlevels = odn->dn_nlevels;
723 ndn->dn_indblkshift = odn->dn_indblkshift;
724 ndn->dn_datablkshift = odn->dn_datablkshift;
725 ndn->dn_datablkszsec = odn->dn_datablkszsec;
726 ndn->dn_datablksz = odn->dn_datablksz;
727 ndn->dn_maxblkid = odn->dn_maxblkid;
728 bcopy(&odn->dn_next_nblkptr[0], &ndn->dn_next_nblkptr[0],
729 sizeof (odn->dn_next_nblkptr));
730 bcopy(&odn->dn_next_nlevels[0], &ndn->dn_next_nlevels[0],
731 sizeof (odn->dn_next_nlevels));
732 bcopy(&odn->dn_next_indblkshift[0], &ndn->dn_next_indblkshift[0],
733 sizeof (odn->dn_next_indblkshift));
734 bcopy(&odn->dn_next_bonustype[0], &ndn->dn_next_bonustype[0],
735 sizeof (odn->dn_next_bonustype));
736 bcopy(&odn->dn_rm_spillblk[0], &ndn->dn_rm_spillblk[0],
737 sizeof (odn->dn_rm_spillblk));
738 bcopy(&odn->dn_next_bonuslen[0], &ndn->dn_next_bonuslen[0],
739 sizeof (odn->dn_next_bonuslen));
740 bcopy(&odn->dn_next_blksz[0], &ndn->dn_next_blksz[0],
741 sizeof (odn->dn_next_blksz));
744 &odn->dn_dirty_records[i]);
746 bcopy(&odn->dn_free_ranges[0], &ndn->dn_free_ranges[0],
747 sizeof (odn->dn_free_ranges));
748 ndn->dn_allocated_txg = odn->dn_allocated_txg;
749 ndn->dn_free_txg = odn->dn_free_txg;
750 ndn->dn_assigned_txg = odn->dn_assigned_txg;
751 ndn->dn_dirtyctx = odn->dn_dirtyctx;
752 ndn->dn_dirtyctx_firstset = odn->dn_dirtyctx_firstset;
753 ASSERT(refcount_count(&odn->dn_tx_holds) == 0);
754 refcount_transfer(&ndn->dn_holds, &odn->dn_holds);
756 avl_swap(&ndn->dn_dbufs, &odn->dn_dbufs);
757 ndn->dn_dbufs_count = odn->dn_dbufs_count;
758 ndn->dn_bonus = odn->dn_bonus;
759 ndn->dn_have_spill = odn->dn_have_spill;
760 ndn->dn_zio = odn->dn_zio;
761 ndn->dn_oldused = odn->dn_oldused;
762 ndn->dn_oldflags = odn->dn_oldflags;
763 ndn->dn_olduid = odn->dn_olduid;
764 ndn->dn_oldgid = odn->dn_oldgid;
765 ndn->dn_newuid = odn->dn_newuid;
766 ndn->dn_newgid = odn->dn_newgid;
767 ndn->dn_id_flags = odn->dn_id_flags;
769 list_move_tail(&ndn->dn_zfetch.zf_stream, &odn->dn_zfetch.zf_stream);
770 ndn->dn_zfetch.zf_dnode = odn->dn_zfetch.zf_dnode;
776 ASSERT(ndn->dn_handle->dnh_dnode == odn);
778 if (ndn->dn_zfetch.zf_dnode == odn) {
785 odn->dn_dbuf = NULL;
786 odn->dn_handle = NULL;
787 avl_create(&odn->dn_dbufs, dbuf_compare, sizeof (dmu_buf_impl_t),
789 odn->dn_dbufs_count = 0;
790 odn->dn_bonus = NULL;
791 odn->dn_zfetch.zf_dnode = NULL;
797 POINTER_INVALIDATE(&odn->dn_objset);
803 list_create(&odn->dn_dirty_records[i],
806 odn->dn_free_ranges[i] = NULL;
807 odn->dn_next_nlevels[i] = 0;
808 odn->dn_next_indblkshift[i] = 0;
809 odn->dn_next_bonustype[i] = 0;
810 odn->dn_rm_spillblk[i] = 0;
811 odn->dn_next_bonuslen[i] = 0;
812 odn->dn_next_blksz[i] = 0;
814 odn->dn_allocated_txg = 0;
815 odn->dn_free_txg = 0;
816 odn->dn_assigned_txg = 0;
817 odn->dn_dirtyctx = 0;
818 odn->dn_dirtyctx_firstset = NULL;
819 odn->dn_have_spill = B_FALSE;
820 odn->dn_zio = NULL;
821 odn->dn_oldused = 0;
822 odn->dn_oldflags = 0;
823 odn->dn_olduid = 0;
824 odn->dn_oldgid = 0;
825 odn->dn_newuid = 0;
826 odn->dn_newgid = 0;
827 odn->dn_id_flags = 0;
833 odn->dn_moved = (uint8_t)-1;
841 dnode_t *odn = buf, *ndn = newbuf;
855 os = odn->dn_objset;
865 if (os != odn->dn_objset) {
882 if (os != odn->dn_objset) {
896 if (DMU_OBJECT_IS_SPECIAL(odn->dn_object)) {
901 ASSERT(odn->dn_dbuf != NULL); /* only "special" dnodes have no parent */
911 if (!zrl_tryenter(&odn->dn_handle->dnh_zrlock)) {
926 if (!rw_tryenter(&odn->dn_struct_rwlock, RW_WRITER)) {
927 zrl_exit(&odn->dn_handle->dnh_zrlock);
942 refcount = refcount_count(&odn->dn_holds);
944 dbufs = odn->dn_dbufs_count;
948 DTRACE_PROBE3(dnode__move, dnode_t *, odn, int64_t, refcount,
952 rw_exit(&odn->dn_struct_rwlock);
953 zrl_exit(&odn->dn_handle->dnh_zrlock);
959 rw_exit(&odn->dn_struct_rwlock);
966 dnode_move_impl(odn, ndn);
968 list_link_replace(&odn->dn_link, &ndn->dn_link);