summaryrefslogtreecommitdiffstats
path: root/module/zfs/ddt.c
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2010-08-26 11:46:09 -0700
committerBrian Behlendorf <[email protected]>2010-08-31 13:41:57 -0700
commit00b46022c676e402e3f33ce93ee2983bbad2c46f (patch)
tree2204630c7abd1784f261df17cec4cd084747042f /module/zfs/ddt.c
parent60101509ee73c6e61e50c0a4079097f31bb39f4b (diff)
Add linux kernel memory support
Required kmem/vmem changes Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'module/zfs/ddt.c')
-rw-r--r--module/zfs/ddt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/module/zfs/ddt.c b/module/zfs/ddt.c
index ae9d2a5e1..c7db3d758 100644
--- a/module/zfs/ddt.c
+++ b/module/zfs/ddt.c
@@ -501,6 +501,7 @@ ddt_get_dedup_stats(spa_t *spa, ddt_stat_t *dds_total)
{
ddt_histogram_t *ddh_total;
+ /* XXX: Move to a slab */
ddh_total = kmem_zalloc(sizeof (ddt_histogram_t), KM_SLEEP);
ddt_get_dedup_histogram(spa, ddh_total);
ddt_histogram_stat(dds_total, ddh_total);
@@ -649,6 +650,7 @@ ddt_alloc(const ddt_key_t *ddk)
{
ddt_entry_t *dde;
+ /* XXX: Move to a slab */
dde = kmem_zalloc(sizeof (ddt_entry_t), KM_SLEEP);
cv_init(&dde->dde_cv, NULL, CV_DEFAULT, NULL);
@@ -797,7 +799,8 @@ ddt_table_alloc(spa_t *spa, enum zio_checksum c)
{
ddt_t *ddt;
- ddt = kmem_zalloc(sizeof (*ddt), KM_SLEEP);
+ /* XXX: Move to a slab */
+ ddt = kmem_zalloc(sizeof (*ddt), KM_SLEEP | KM_NODEBUG);
mutex_init(&ddt->ddt_lock, NULL, MUTEX_DEFAULT, NULL);
avl_create(&ddt->ddt_tree, ddt_entry_compare,