summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorMing Lei <ming.lei@redhat.com>2025-02-28 21:26:56 +0800
committerJens Axboe <axboe@kernel.dk>2025-02-28 07:06:42 -0700
commitb654f7a51ffb386131de42aa98ed831f8c126546 (patch)
tree9f92dfe0e7ff290e187be242511ac7cd4a033af0 /block
parenta6aa36e957a1bfb5341986dec32d013d23228fe1 (diff)
downloadlinux-b654f7a51ffb386131de42aa98ed831f8c126546.tar.gz
linux-b654f7a51ffb386131de42aa98ed831f8c126546.tar.bz2
linux-b654f7a51ffb386131de42aa98ed831f8c126546.zip
block: fix 'kmem_cache of name 'bio-108' already exists'
Device mapper bioset often has big bio_slab size, which can be more than 1000, then 8byte can't hold the slab name any more, cause the kmem_cache allocation warning of 'kmem_cache of name 'bio-108' already exists'. Fix the warning by extending bio_slab->name to 12 bytes, but fix output of /proc/slabinfo Reported-by: Guangwu Zhang <guazhang@redhat.com> Signed-off-by: Ming Lei <ming.lei@redhat.com> Link: https://lore.kernel.org/r/20250228132656.2838008-1-ming.lei@redhat.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
-rw-r--r--block/bio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/bio.c b/block/bio.c
index f0c416e5931d..6ac5983ba51e 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -77,7 +77,7 @@ struct bio_slab {
struct kmem_cache *slab;
unsigned int slab_ref;
unsigned int slab_size;
- char name[8];
+ char name[12];
};
static DEFINE_MUTEX(bio_slab_lock);
static DEFINE_XARRAY(bio_slabs);