[PATCH] nvme-core: update NS Attr Changed AEN handling for ANA group
Sagi Grimberg
sagi at grimberg.me
Wed Nov 18 11:51:30 EST 2020
> Fix this by reading the ANA log page as part of ana_work so
> that ngrps gets updated, prior to invoking nvme_queue_scan().
Nothing guarantees ordering here..
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index fff90200497c..749d45c207f7 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -4315,6 +4315,10 @@ static void nvme_handle_aen_notice(struct nvme_ctrl *ctrl, u32 result)
> switch (aer_notice_type) {
> case NVME_AER_NOTICE_NS_CHANGED:
> set_bit(NVME_AER_NOTICE_NS_CHANGED, &ctrl->events);
> +#ifdef CONFIG_NVME_MULTIPATH
> + if (ctrl->ana_log_buf)
> + queue_work(nvme_wq, &ctrl->ana_work);
> +#endif
> nvme_queue_scan(ctrl);
> break;
> case NVME_AER_NOTICE_FW_ACT_STARTING:
>
More information about the Linux-nvme
mailing list