[PATCHv3] nvme: correctly account for namespace head reference counter

Daniel Wagner dwagner at suse.de
Thu Jun 26 01:41:46 PDT 2025


On Thu, Jun 26, 2025 at 01:59:22PM +0530, Nilay Shroff wrote:
> The variable @last_path is meant to indicate that we're releasing/removing the last
> remaining path to the namespace, which is relevant only when NVMe multipath is enabled
> (i.e., ns->head->disk is set). So if we rename @last_path to @multipath, it could
> become less intuitive, as the name wouldn't reflect the actual logic — that we're
> conditionally releasing the nshead reference only when the last path to the namespace 
> is being removed. Hence, in this context, IMO, @last_path is more semantically accurate
> and self-explanatory.
> 
> Moreover, in nvme_ns_remove() as well we use @last_path in the same context as
> mentioned above. 

Thanks for the explanation. As I said nitpick/bikeshedding :)



More information about the Linux-nvme mailing list