Commit 61445b56 authored by Omar Sandoval's avatar Omar Sandoval Committed by Jens Axboe

sbitmap: warn if using smaller shallow depth than was setup

Make sure the user passed the right value to
Acked-by: default avatarPaolo Valente <>
Signed-off-by: default avatarOmar Sandoval <>
Signed-off-by: default avatarJens Axboe <>
parent 28820640
......@@ -402,6 +402,8 @@ int __sbitmap_queue_get_shallow(struct sbitmap_queue *sbq,
unsigned int hint, depth;
int nr;
WARN_ON_ONCE(shallow_depth < sbq->min_shallow_depth);
hint = this_cpu_read(*sbq->alloc_hint);
depth = READ_ONCE(sbq->sb.depth);
if (unlikely(hint >= depth)) {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment