These allocations in mzap_update() used to be kmem_alloc() but
were changed to vmem_alloc() due to the size of the allocation.
However, since it turns out this function may be called in the
context of the txg_sync thread they must be changed back to use
a kmem_alloc() to ensure the KM_PUSHPAGE flag is honored.
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
ASSERT(RW_WRITE_HELD(&zap->zap_rwlock));
sz = zap->zap_dbuf->db_size;
- mzp = vmem_alloc(sz, KM_SLEEP);
+ mzp = kmem_alloc(sz, KM_PUSHPAGE | KM_NODEBUG);
bcopy(zap->zap_dbuf->db_data, mzp, sz);
nchunks = zap->zap_m.zap_num_chunks;
err = dmu_object_set_blocksize(zap->zap_objset, zap->zap_object,
1ULL << fzap_default_block_shift, 0, tx);
if (err) {
- vmem_free(mzp, sz);
+ kmem_free(mzp, sz);
return (err);
}
}
if (err)
break;
}
- vmem_free(mzp, sz);
+ kmem_free(mzp, sz);
*zapp = zap;
return (err);
}