[PATCH 01/13] libmultipath: Add initial framework

John Garry john.g.garry at oracle.com
Mon Mar 2 04:21:54 PST 2026


On 02/03/2026 12:08, Nilay Shroff wrote:
>> +struct mpath_head {
>> +    struct srcu_struct    srcu;
>> +    struct list_head    dev_list;    /* list of all mpath_devs */
>> +    struct mutex        lock;
>> +
>> +    struct kref        ref;
>> +
>> +    struct mpath_device __rcu         *current_path[MAX_NUMNODES];
>> +    void            *drvdata;
>> +};
> 
> Can we use current_path[] as last element and flex array (same as what
> we have today under struct nvme_ns_head) so that we don't need to 
> allocate array as big as MAX_NUMANODES? With flex array we can use 
> num_possible_nodes() which may be much smaller than MAX_NUMANODES.


Sure, I don't see a problem with that. I think that using MAX_NUMNODES 
was a leftover from an earlier dev approach.

Thanks!



More information about the Linux-nvme mailing list