From: Brian Behlendorf Date: Fri, 28 May 2010 20:52:23 +0000 (-0700) Subject: Merge commit 'refs/top-bases/fix-dnode-cons' into fix-dnode-cons X-Git-Tag: zfs-0.5.0~38^2^2~1^2^2~34^2^2^2~11^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1a55aa78e70138229203d2ef1b0474287b7d318a;p=zfs Merge commit 'refs/top-bases/fix-dnode-cons' into fix-dnode-cons Conflicts: module/zfs/dnode.c --- 1a55aa78e70138229203d2ef1b0474287b7d318a diff --cc module/zfs/dnode.c index 6e4633a05,c16902d21..c74ba8ac3 --- a/module/zfs/dnode.c +++ b/module/zfs/dnode.c @@@ -334,13 -319,9 +359,16 @@@ dnode_create(objset_t *os, dnode_phys_ dn->dn_bonustype = dnp->dn_bonustype; dn->dn_bonuslen = dnp->dn_bonuslen; dn->dn_maxblkid = dnp->dn_maxblkid; + dn->dn_allocated_txg = 0; + dn->dn_free_txg = 0; + dn->dn_assigned_txg = 0; + dn->dn_dirtyctx = DN_UNDIRTIED; + dn->dn_dirtyctx_firstset = NULL; + dn->dn_bonus = NULL; + dn->dn_zio = NULL; + dn->dn_have_spill = ((dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR) != 0); + dn->dn_id_flags = 0; + dmu_zfetch_init(&dn->dn_zfetch, dn); ASSERT(dn->dn_phys->dn_type < DMU_OT_NUMTYPES); diff --cc module/zfs/include/sys/dmu_zfetch.h index 97b673852,78cadd2b1..ea73d8f02 --- a/module/zfs/include/sys/dmu_zfetch.h +++ b/module/zfs/include/sys/dmu_zfetch.h @@@ -63,11 -61,11 +61,14 @@@ typedef struct zfetch uint64_t zf_alloc_fail; /* # of failed attempts to alloc strm */ } zfetch_t; + void zfetch_init(void); + void zfetch_fini(void); + void dmu_zfetch_init(zfetch_t *, struct dnode *); void dmu_zfetch_rele(zfetch_t *); +void dmu_zfetch_cons(zfetch_t *); +void dmu_zfetch_dest(zfetch_t *); + void dmu_zfetch(zfetch_t *, uint64_t, uint64_t, int);