X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=module%2Fzfs%2Fddt.c;h=895422b50110e4d7c6b696c959334ff4c19216f3;hb=23a61ccc1b89fa5b89b5d8383d57cf5152406cfc;hp=7279f1d5dc0785443230120d82443f1d7c18612e;hpb=e95b3bdcbbc64ea502349413234e7c71563e7115;p=zfs.git diff --git a/module/zfs/ddt.c b/module/zfs/ddt.c index 7279f1d..895422b 100644 --- a/module/zfs/ddt.c +++ b/module/zfs/ddt.c @@ -120,7 +120,9 @@ ddt_object_load(ddt_t *ddt, enum ddt_type type, enum ddt_class class) /* * Seed the cached statistics. */ - VERIFY(ddt_object_info(ddt, type, class, &doi) == 0); + error = ddt_object_info(ddt, type, class, &doi); + if (error) + return (error); ddo->ddo_count = ddt_object_count(ddt, type, class); ddo->ddo_dspace = doi.doi_physical_blocks_512 << 9; @@ -502,7 +504,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); + ddh_total = kmem_zalloc(sizeof (ddt_histogram_t), KM_PUSHPAGE); ddt_get_dedup_histogram(spa, ddh_total); ddt_histogram_stat(dds_total, ddh_total); kmem_free(ddh_total, sizeof (ddt_histogram_t)); @@ -651,7 +653,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); + dde = kmem_zalloc(sizeof (ddt_entry_t), KM_PUSHPAGE); cv_init(&dde->dde_cv, NULL, CV_DEFAULT, NULL); dde->dde_key = *ddk; @@ -800,7 +802,7 @@ ddt_table_alloc(spa_t *spa, enum zio_checksum c) ddt_t *ddt; /* XXX: Move to a slab */ - ddt = kmem_zalloc(sizeof (*ddt), KM_SLEEP | KM_NODEBUG); + ddt = kmem_zalloc(sizeof (*ddt), KM_PUSHPAGE | KM_NODEBUG); mutex_init(&ddt->ddt_lock, NULL, MUTEX_DEFAULT, NULL); avl_create(&ddt->ddt_tree, ddt_entry_compare, @@ -902,7 +904,7 @@ ddt_class_contains(spa_t *spa, enum ddt_class max_class, const blkptr_t *bp) return (B_TRUE); ddt = spa->spa_ddt[BP_GET_CHECKSUM(bp)]; - dde = kmem_alloc(sizeof(ddt_entry_t), KM_SLEEP); + dde = kmem_alloc(sizeof(ddt_entry_t), KM_PUSHPAGE); ddt_key_fill(&(dde->dde_key), bp);