Re: [PATCH] nvme: fix command effects log lifetime for multipath heads
Keith Busch <[email protected]>
| Newsgroups | org.infradead.lists.linux-nvme,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <ao3mNp35Hg_0MDlR@kbusch-mbp> |
On Fri, Aug 14, 2026 at 03:06:51PM +0800, Yao Sang wrote:
> @@ -4132,6 +4125,12 @@ static int nvme_init_ns_head(struct nvme_ns *ns, struct nvme_ns_info *info)
> }
>
> mutex_lock(&ctrl->subsys->lock);
> + ret = nvme_get_effects_log(ctrl, info->ids.csi, &ns->effects);
> + if (ret) {
> + if (ret > 0)
> + ret = blk_status_to_errno(nvme_error_status(ret));
> + goto out_unlock;
> + }
The effects should be the same for every path, so it's a bit wasteful to
copy it for each one. Perhaps it should be just one effects log per
subsystem, per command set, and the head points to that.