]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: handle zone resources errors
authorDamien Le Moal <damien.lemoal@wdc.com>
Thu, 24 Sep 2020 20:53:30 +0000 (13:53 -0700)
committerJens Axboe <axboe@kernel.dk>
Tue, 13 Oct 2020 21:05:05 +0000 (15:05 -0600)
commitcaad74db9ea6d28c11857c667bd51884ae24ce21
tree354b08e6451d20c85d261cf831f9f5750a2c0e5e
parent1d7715ac5f01a510d61d20ce56b40b8ddbd3d51b
scsi: handle zone resources errors

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.

Acked-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/scsi/scsi_lib.c