[PATCH] nvmet: do not ignore error_location FFFFh (NVMET_NO_ERROR_LOC) on nvmet_set_error

Chaitanya Kulkarni Chaitanya.Kulkarni at wdc.com
Sun Apr 11 23:05:17 BST 2021


On 4/11/21 01:29, amit.engel at dell.com wrote:
> diff --git a/drivers/nvme/target/admin-cmd.c b/drivers/nvme/target/admin-cmd.c
> index f4cc32674edd..2506f8de2e8b 100644
> --- a/drivers/nvme/target/admin-cmd.c
> +++ b/drivers/nvme/target/admin-cmd.c
> @@ -689,8 +689,10 @@ static u16 nvmet_write_protect_flush_sync(struct nvmet_req *req)
>  	else
>  		status = nvmet_bdev_flush(req);
>  
> -	if (status)
> +	if (status) {
>  		pr_err("write protect flush failed nsid: %u\n", req->ns->nsid);
> +		req->error_loc = offsetof(struct nvme_common_command, cdw11);
> +	}
>  	return status;
>  }
>  

Do you have an application level use case to recording the internal errors
for target ?





More information about the Linux-nvme mailing list