[PATCH 3/3] nvmet: replace transports array with a linked list

Christoph Hellwig hch at lst.de
Mon Sep 22 10:35:40 PDT 2025


On Sun, Sep 21, 2025 at 02:49:43AM +0300, Max Gurtovoy wrote:
> The nvmet_transports array was sized to 255 (NVMF_TRTYPE_MAX), although
> only up to 5 transport types can ever be registered, resulting in
> some unused memory. This change replaces the array with a linked list to
> store registered transport ops, substantially improving memory
> efficiency by allocating space only for active transports.

This adds extra code and makes previously const data structures mutable
to save a little bit of space, which feels like the wrong tradeoff.

What is your motivation here?




More information about the Linux-nvme mailing list