Re: [PATCH v10 2/3] rust: id_pool: do not round capacity up to BitmapVec::MAX_INLINE_LEN

From: Alexandre Courbot

Date: Sat Nov 07 2026 - 07:58:50 EST


On Mon Oct 19, 2026 at 1:29 PM JST, Eliot Courtney wrote:
> Current code in IdPool::with_capacity rounds the capacity up to
> BitmapVec::MAX_INLINE_LEN, but BitmapVec::new works fine with values
> smaller than this and still uses an inline representation. Remove this
> behaviour.
>
> This allows specifying a real capacity of 0, which was not previously
> possible. This breaks `grow_request` in this case, so change it to grow
> to at least `BitmapVec::MAX_INLINE_LEN`, mirroring the capacity floor in
> `shrink_request`.
>
> Signed-off-by: Eliot Courtney <ecourtney@xxxxxxxxxx>
> ---
> rust/kernel/id_pool.rs | 38 ++++++++++++++++++++++++++++++++------
> 1 file changed, 32 insertions(+), 6 deletions(-)

Alice, Burak, Yury: I would like to get this series out of its current
limbo. AFAICT, Alice and Burak are ok with the current design [1][2],
and Yury's request to change stop using a zero-sized pool in the example
has been fulfilled by this patch [3].

This series would need to go through drm-rust-next as we have
dependencies on it for the 4.5 cycle. May I ask for an ack on this patch
to push it through drm-rust-next?

[1] https://lore.kernel.org/all/ao2U1jNaT7waibJW@xxxxxxxxxx/
[2] https://lore.kernel.org/all/CABwQupOYBBev5WkQry3oOoX5tGCs-ggDE4L_nK8BBYvrO=81bA@xxxxxxxxxxxxxx/
[3] https://lore.kernel.org/all/DM62T4RN38EX.2RMVNDEJV9T5U@xxxxxxxxxx/