All of lore.kernel.org
 help / color / mirror / Atom feed
From: Damien Le Moal <Damien.LeMoal@wdc.com>
To: Keith Busch <kbusch@kernel.org>,
	"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
	"sagi@grimberg.me" <sagi@grimberg.me>, "hch@lst.de" <hch@lst.de>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>
Cc: "axboe@kernel.dk" <axboe@kernel.dk>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
	Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
Subject: Re: [PATCHv3 4/4] scsi: handle zone resources errors
Date: Fri, 18 Sep 2020 00:37:47 +0000	[thread overview]
Message-ID: <CY4PR04MB3751016C986A95E69AFCBCA4E73F0@CY4PR04MB3751.namprd04.prod.outlook.com> (raw)
In-Reply-To: 20200917231841.4029747-5-kbusch@kernel.org

On 2020/09/18 8:18, Keith Busch wrote:
> From: Damien Le Moal <damien.lemoal@wdc.com>
> 
> ZBC or ZAC disks that have a limit on the number of open zones may fail
> a zone open command or a write to a zone that is not already implicitly
> or explicitly open if the total number of open zones is already at the
> maximum allowed.
> 
> For these operations, instead of returning the generic BLK_STS_IOERR,
> return BLK_STS_ZONE_OPEN_RESOURCE which is returned as -ETOOMANYREFS to
> the I/O issuer, allowing the device user to act appropriately on these
> relatively benign zone resource errors.
> 
> Cc: Christoph Hellwig <hch@lst.de>
> Cc: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
> Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>

Shouldn't you add your signed-off-by here ?

> ---
>  drivers/scsi/scsi_lib.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
> index 7affaaf8b98e..c129ac6666da 100644
> --- a/drivers/scsi/scsi_lib.c
> +++ b/drivers/scsi/scsi_lib.c
> @@ -758,6 +758,15 @@ static void scsi_io_completion_action(struct scsi_cmnd *cmd, int result)
>  			/* See SSC3rXX or current. */
>  			action = ACTION_FAIL;
>  			break;
> +		case DATA_PROTECT:
> +			action = ACTION_FAIL;
> +			if ((sshdr.asc == 0x0C && sshdr.ascq == 0x12) ||
> +			    (sshdr.asc == 0x55 &&
> +			     (sshdr.ascq == 0x0E || sshdr.ascq == 0x0F))) {
> +				/* Insufficient zone resources */
> +				blk_stat = BLK_STS_ZONE_OPEN_RESOURCE;
> +			}
> +			break;
>  		default:
>  			action = ACTION_FAIL;
>  			break;
> 


-- 
Damien Le Moal
Western Digital Research

WARNING: multiple messages have this Message-ID (diff)
From: Damien Le Moal <Damien.LeMoal@wdc.com>
To: Keith Busch <kbusch@kernel.org>,
	"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
	"sagi@grimberg.me" <sagi@grimberg.me>, "hch@lst.de" <hch@lst.de>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>
Cc: "axboe@kernel.dk" <axboe@kernel.dk>,
	Johannes Thumshirn <Johannes.Thumshirn@wdc.com>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>
Subject: Re: [PATCHv3 4/4] scsi: handle zone resources errors
Date: Fri, 18 Sep 2020 00:37:47 +0000	[thread overview]
Message-ID: <CY4PR04MB3751016C986A95E69AFCBCA4E73F0@CY4PR04MB3751.namprd04.prod.outlook.com> (raw)
In-Reply-To: 20200917231841.4029747-5-kbusch@kernel.org

On 2020/09/18 8:18, Keith Busch wrote:
> From: Damien Le Moal <damien.lemoal@wdc.com>
> 
> ZBC or ZAC disks that have a limit on the number of open zones may fail
> a zone open command or a write to a zone that is not already implicitly
> or explicitly open if the total number of open zones is already at the
> maximum allowed.
> 
> For these operations, instead of returning the generic BLK_STS_IOERR,
> return BLK_STS_ZONE_OPEN_RESOURCE which is returned as -ETOOMANYREFS to
> the I/O issuer, allowing the device user to act appropriately on these
> relatively benign zone resource errors.
> 
> Cc: Christoph Hellwig <hch@lst.de>
> Cc: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
> Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>

Shouldn't you add your signed-off-by here ?

> ---
>  drivers/scsi/scsi_lib.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
> index 7affaaf8b98e..c129ac6666da 100644
> --- a/drivers/scsi/scsi_lib.c
> +++ b/drivers/scsi/scsi_lib.c
> @@ -758,6 +758,15 @@ static void scsi_io_completion_action(struct scsi_cmnd *cmd, int result)
>  			/* See SSC3rXX or current. */
>  			action = ACTION_FAIL;
>  			break;
> +		case DATA_PROTECT:
> +			action = ACTION_FAIL;
> +			if ((sshdr.asc == 0x0C && sshdr.ascq == 0x12) ||
> +			    (sshdr.asc == 0x55 &&
> +			     (sshdr.ascq == 0x0E || sshdr.ascq == 0x0F))) {
> +				/* Insufficient zone resources */
> +				blk_stat = BLK_STS_ZONE_OPEN_RESOURCE;
> +			}
> +			break;
>  		default:
>  			action = ACTION_FAIL;
>  			break;
> 


-- 
Damien Le Moal
Western Digital Research

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

  reply	other threads:[~2020-09-18  0:37 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-17 23:18 [PATCHv3 0/4] zoned block device specific errors Keith Busch
2020-09-17 23:18 ` Keith Busch
2020-09-17 23:18 ` [PATCHv3 1/4] block: add zone specific block statuses Keith Busch
2020-09-17 23:18   ` Keith Busch
2020-09-18  0:29   ` Damien Le Moal
2020-09-18  0:29     ` Damien Le Moal
2020-09-18 13:31   ` Johannes Thumshirn
2020-09-18 13:31     ` Johannes Thumshirn
2020-09-18 19:40     ` Keith Busch
2020-09-18 19:40       ` Keith Busch
2020-09-21  6:54       ` Johannes Thumshirn
2020-09-21  6:54         ` Johannes Thumshirn
2020-09-17 23:18 ` [PATCHv3 2/4] nvme: translate zone resource errors Keith Busch
2020-09-17 23:18   ` Keith Busch
2020-09-18  0:30   ` Damien Le Moal
2020-09-18  0:30     ` Damien Le Moal
2020-09-18 13:29   ` Johannes Thumshirn
2020-09-18 13:29     ` Johannes Thumshirn
2020-09-17 23:18 ` [PATCHv3 3/4] scsi: update additional sense codes list Keith Busch
2020-09-17 23:18   ` Keith Busch
2020-09-18  0:36   ` Damien Le Moal
2020-09-18  0:36     ` Damien Le Moal
2020-09-17 23:18 ` [PATCHv3 4/4] scsi: handle zone resources errors Keith Busch
2020-09-17 23:18   ` Keith Busch
2020-09-18  0:37   ` Damien Le Moal [this message]
2020-09-18  0:37     ` Damien Le Moal
2020-09-22 21:45   ` Martin K. Petersen
2020-09-22 21:45     ` Martin K. Petersen
2020-09-18  0:49 ` [PATCHv3 0/4] zoned block device specific errors Damien Le Moal
2020-09-18  0:49   ` Damien Le Moal
2020-09-22 13:10 ` Christoph Hellwig
2020-09-22 13:10   ` Christoph Hellwig
2020-09-22 21:48 ` Martin K. Petersen
2020-09-22 21:48   ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CY4PR04MB3751016C986A95E69AFCBCA4E73F0@CY4PR04MB3751.namprd04.prod.outlook.com \
    --to=damien.lemoal@wdc.com \
    --cc=Johannes.Thumshirn@wdc.com \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=sagi@grimberg.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.