From d519c10575602952258f7e9e300af79a2b04d801 Mon Sep 17 00:00:00 2001 From: Matthew Ahrens Date: Thu, 30 Jul 2020 13:46:32 -0700 Subject: [PATCH] Remove KMC_NOHASH Remove dead code to make the implementation easier to understand. Reviewed-by: Ryan Moeller Reviewed-by: Brian Behlendorf Signed-off-by: Matt Ahrens Closes #10650 --- include/os/linux/spl/sys/kmem_cache.h | 2 -- lib/libspl/include/umem.h | 2 -- module/os/linux/spl/spl-kmem-cache.c | 2 -- 3 files changed, 6 deletions(-) diff --git a/include/os/linux/spl/sys/kmem_cache.h b/include/os/linux/spl/sys/kmem_cache.h index ca1fdeda4..f152f6263 100644 --- a/include/os/linux/spl/sys/kmem_cache.h +++ b/include/os/linux/spl/sys/kmem_cache.h @@ -38,7 +38,6 @@ typedef enum kmc_bit { KMC_BIT_NODEBUG = 1, /* Default behavior */ KMC_BIT_NOMAGAZINE = 2, /* XXX: Unsupported */ - KMC_BIT_NOHASH = 3, /* XXX: Unsupported */ KMC_BIT_QCACHE = 4, /* XXX: Unsupported */ KMC_BIT_KMEM = 5, /* Use kmem cache */ KMC_BIT_VMEM = 6, /* Use vmem cache */ @@ -64,7 +63,6 @@ typedef enum kmem_cbrc { #define KMC_NODEBUG (1 << KMC_BIT_NODEBUG) #define KMC_NOMAGAZINE (1 << KMC_BIT_NOMAGAZINE) -#define KMC_NOHASH (1 << KMC_BIT_NOHASH) #define KMC_QCACHE (1 << KMC_BIT_QCACHE) #define KMC_KMEM (1 << KMC_BIT_KMEM) #define KMC_VMEM (1 << KMC_BIT_VMEM) diff --git a/lib/libspl/include/umem.h b/lib/libspl/include/umem.h index ef9026009..b6ea3b93a 100644 --- a/lib/libspl/include/umem.h +++ b/lib/libspl/include/umem.h @@ -57,10 +57,8 @@ typedef void vmem_t; /* * Flags for umem_cache_create() */ -#define UMC_NOTOUCH 0x00010000 #define UMC_NODEBUG 0x00020000 #define UMC_NOMAGAZINE 0x00040000 -#define UMC_NOHASH 0x00080000 #define UMEM_CACHE_NAMELEN 31 diff --git a/module/os/linux/spl/spl-kmem-cache.c b/module/os/linux/spl/spl-kmem-cache.c index 8764c51c7..8a4a15075 100644 --- a/module/os/linux/spl/spl-kmem-cache.c +++ b/module/os/linux/spl/spl-kmem-cache.c @@ -721,7 +721,6 @@ spl_magazine_destroy(spl_kmem_cache_t *skc) * KMC_KVMEM Force kvmem backed SPL cache * KMC_SLAB Force Linux slab backed cache * KMC_NODEBUG Disable debugging (unsupported) - * KMC_NOHASH Disable hashing (unsupported) * KMC_QCACHE Disable qcache (unsupported) * KMC_NOMAGAZINE Enabled for kmem/vmem, Disabled for Linux slab */ @@ -738,7 +737,6 @@ spl_kmem_cache_create(char *name, size_t size, size_t align, * Unsupported flags */ ASSERT0(flags & KMC_NOMAGAZINE); - ASSERT0(flags & KMC_NOHASH); ASSERT0(flags & KMC_QCACHE); ASSERT(vmp == NULL); ASSERT(reclaim == NULL);