diff options
| author | Ming Lei <ming.lei@redhat.com> | 2025-02-28 21:26:56 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-03-22 12:56:51 -0700 |
| commit | f49e1153d2f1e38d200977e18a502682b55a897a (patch) | |
| tree | bd4fb23caf1964dc5b2be37a90a4659fb95de054 /block | |
| parent | 361ed1c164c183598501540fbdfb0f25e8d9e3a3 (diff) | |
| download | linux-f49e1153d2f1e38d200977e18a502682b55a897a.tar.gz linux-f49e1153d2f1e38d200977e18a502682b55a897a.tar.bz2 linux-f49e1153d2f1e38d200977e18a502682b55a897a.zip | |
block: fix 'kmem_cache of name 'bio-108' already exists'
[ Upstream commit b654f7a51ffb386131de42aa98ed831f8c126546 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'block')
| -rw-r--r-- | block/bio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/bio.c b/block/bio.c index d5bdc31d88d3..f54e8572affc 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); |
