scsi: scsi_debug: Implement ZBC host-aware emulation
authorDamien Le Moal <damien.lemoal@wdc.com>
Wed, 22 Apr 2020 10:42:21 +0000 (19:42 +0900)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 5 May 2020 04:37:34 +0000 (00:37 -0400)
commit64e14ece07004f0bf434fe7aad4a6d6411b1d9b6
tree19b180f04bd976c53964ac636fb0b4324e3c7453
parent98e0a689868c26eb82650ee759073f2295e74c97
scsi: scsi_debug: Implement ZBC host-aware emulation

Implement ZBC host-aware device model emulation. The main changes from the
host-managed emulation are the device type (TYPE_DISK is used), relaxation
of access checks for read and write operations and different handling of a
sequential write preferred zone write pointer as mandated by the ZBC r05
specifications.

To facilitate the implementation and avoid a lot of "if" statement, the
zmodel field is added to the device information and the z_type field to the
zone state data structure.

Link: https://lore.kernel.org/r/20200422104221.378203-8-damien.lemoal@wdc.com
Tested-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/scsi_debug.c