[PATCH 1/1] nvme-fabrics: Generate uevent on namespace AENs

Chaitanya Kulkarni Chaitanya.Kulkarni at wdc.com
Thu Apr 29 02:24:42 BST 2021


Also, subject line should start with "nvme:" and not "nvme-fabrics:"
as this code belongs to nvme/host/core.c and not nvme/host/fabrics.c

On 4/28/21 13:28, Martin Belanger wrote:
> From: Martin Belanger <martin.belanger at dell.com>
>
> Generate uevent on NVMe Async Event Notifications for NS_CHANGED and ANA. Today
> the uevent handler is not capturing on NVME_AER_NOTICE_NS_CHANGED
> (Namespace Changed) and NVME_AER_NOTICE_ANA (Asymmetric Namespace Access).
>
> Signed-off-by: Martin Belanger <Martin_Belanger at dell.com>
>
>
> ---
>  drivers/nvme/host/core.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index 2f45e8fcdd7c..bd37ddb172de 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -1115,7 +1115,7 @@ EXPORT_SYMBOL_NS_GPL(nvme_execute_passthru_rq, NVME_TARGET_PASSTHRU);
>
>  /*
>   * Recommended frequency for KATO commands per NVMe 1.4 section 7.12.1:
> - *
> + *

Please don't add extra lines.

>   *   The host should send Keep Alive commands at half of the Keep Alive Timeout
>   *   accounting for transport roundtrip times [..].
>   */
> @@ -4133,6 +4133,7 @@ static void nvme_handle_aen_notice(struct nvme_ctrl *ctrl, u32 result)
>  	case NVME_AER_NOTICE_NS_CHANGED:
>  		set_bit(NVME_AER_NOTICE_NS_CHANGED, &ctrl->events);
>  		nvme_queue_scan(ctrl);
> +		ctrl->aen_result = result;
>  		break;
>  	case NVME_AER_NOTICE_FW_ACT_STARTING:
>  		/*
> @@ -4148,6 +4149,7 @@ static void nvme_handle_aen_notice(struct nvme_ctrl *ctrl, u32 result)
>  		if (!ctrl->ana_log_buf)
>  			break;
>  		queue_work(nvme_wq, &ctrl->ana_work);
> +		ctrl->aen_result = result;
>  		break;
>  #endif
>  	case NVME_AER_NOTICE_DISC_CHANGED:
> --
> 2.25.1
>
>
> _______________________________________________
> Linux-nvme mailing list
> Linux-nvme at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-nvme
>




More information about the Linux-nvme mailing list