#define DNODE_STAT_ADD(stat) /* nothing */
#endif /* DNODE_STATS */
-static dnode_phys_t dnode_phys_zero;
+ASSERTV(static dnode_phys_t dnode_phys_zero);
int zfs_default_bs = SPA_MINBLOCKSHIFT;
int zfs_default_ibs = DN_MAX_INDBLKSHIFT;
+#ifdef _KERNEL
static kmem_cbrc_t dnode_move(void *, void *, size_t, void *);
+#endif /* _KERNEL */
/* ARGSUSED */
static int
dnode_init(void)
{
ASSERT(dnode_cache == NULL);
- dnode_cache = kmem_cache_create("dnode_t",
- sizeof (dnode_t),
- 0, dnode_cons, dnode_dest, NULL, NULL, NULL, 0);
+ dnode_cache = kmem_cache_create("dnode_t", sizeof (dnode_t),
+ 0, dnode_cons, dnode_dest, NULL, NULL, NULL, KMC_KMEM);
kmem_cache_set_move(dnode_cache, dnode_move);
}
}
if (dn->dn_phys->dn_type != DMU_OT_NONE || dn->dn_allocated_txg != 0) {
int i;
- ASSERT3U(dn->dn_indblkshift, >=, 0);
ASSERT3U(dn->dn_indblkshift, <=, SPA_MAXBLOCKSHIFT);
if (dn->dn_datablkshift) {
ASSERT3U(dn->dn_datablkshift, >=, SPA_MINBLOCKSHIFT);
mutex_exit(&dn->dn_mtx);
}
+#ifdef _KERNEL
#ifdef DNODE_STATS
static struct {
uint64_t dms_dnode_invalid;
odn->dn_moved = (uint8_t)-1;
}
-#ifdef _KERNEL
/*ARGSUSED*/
static kmem_cbrc_t
dnode_move(void *buf, void *newbuf, size_t size, void *arg)
int i;
dnode_children_t *winner;
children_dnodes = kmem_alloc(sizeof (dnode_children_t) +
- (epb - 1) * sizeof (dnode_handle_t), KM_SLEEP);
+ (epb - 1) * sizeof (dnode_handle_t),
+ KM_PUSHPAGE | KM_NODEBUG);
children_dnodes->dnc_count = epb;
dnh = &children_dnodes->dnc_children[0];
for (i = 0; i < epb; i++) {
zrl_init(&dnh[i].dnh_zrlock);
dnh[i].dnh_dnode = NULL;
}
- if (winner = dmu_buf_set_user(&db->db, children_dnodes, NULL,
- dnode_buf_pageout)) {
+ if ((winner = dmu_buf_set_user(&db->db, children_dnodes, NULL,
+ dnode_buf_pageout))) {
kmem_free(children_dnodes, sizeof (dnode_children_t) +
(epb - 1) * sizeof (dnode_handle_t));
children_dnodes = winner;
int shift = epbs + dn->dn_datablkshift;
first = blkid >> epbs;
- if (db = dbuf_hold_level(dn, 1, first, FTAG)) {
+ if ((db = dbuf_hold_level(dn, 1, first, FTAG))) {
dbuf_will_dirty(db, tx);
dbuf_rele(db, FTAG);
}