FROMGIT: scsi: scsi_debug: Rename zone type constants
Rename the scsi_debug zone type constants to prevent a conflict with the ZBC_ZONE_TYPE_GAP constant from include/scsi/scsi_proto.h. Link: https://lore.kernel.org/r/20220421183023.3462291-9-bvanassche@acm.org Cc: Douglas Gilbert <dgilbert@interlog.com> Acked-by: Douglas Gilbert <dgilbert@interlog.com> Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> [ bvanassche: Extracted these changes from a larger patch ] Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Bug: 230616396 (cherry picked from commit 35dbe2b9a7b0c92777c855c6a2cca8390f4c166b mkp-scsi/staging) Signed-off-by: Bart Van Assche <bvanassche@acm.org> Change-Id: Ibd71fb99c22839188b66649c948afe1a600f8c03
This commit is contained in:
committed by
Jaegeuk Kim
parent
b27960f108
commit
c8622f49e4
@@ -250,9 +250,9 @@ static const char *sdebug_version_date = "20200710";
|
||||
|
||||
/* Zone types (zbcr05 table 25) */
|
||||
enum sdebug_z_type {
|
||||
ZBC_ZONE_TYPE_CNV = 0x1,
|
||||
ZBC_ZONE_TYPE_SWR = 0x2,
|
||||
ZBC_ZONE_TYPE_SWP = 0x3,
|
||||
ZBC_ZTYPE_CNV = 0x1,
|
||||
ZBC_ZTYPE_SWR = 0x2,
|
||||
ZBC_ZTYPE_SWP = 0x3,
|
||||
};
|
||||
|
||||
/* enumeration names taken from table 26, zbcr05 */
|
||||
@@ -2670,7 +2670,7 @@ static struct sdeb_zone_state *zbc_zone(struct sdebug_dev_info *devip,
|
||||
|
||||
static inline bool zbc_zone_is_conv(struct sdeb_zone_state *zsp)
|
||||
{
|
||||
return zsp->z_type == ZBC_ZONE_TYPE_CNV;
|
||||
return zsp->z_type == ZBC_ZTYPE_CNV;
|
||||
}
|
||||
|
||||
static void zbc_close_zone(struct sdebug_dev_info *devip,
|
||||
@@ -2751,7 +2751,7 @@ static void zbc_inc_wp(struct sdebug_dev_info *devip,
|
||||
if (zbc_zone_is_conv(zsp))
|
||||
return;
|
||||
|
||||
if (zsp->z_type == ZBC_ZONE_TYPE_SWR) {
|
||||
if (zsp->z_type == ZBC_ZTYPE_SWR) {
|
||||
zsp->z_wp += num;
|
||||
if (zsp->z_wp >= zend)
|
||||
zsp->z_cond = ZC5_FULL;
|
||||
@@ -2818,7 +2818,7 @@ static int check_zbc_access_params(struct scsi_cmnd *scp,
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (zsp->z_type == ZBC_ZONE_TYPE_SWR) {
|
||||
if (zsp->z_type == ZBC_ZTYPE_SWR) {
|
||||
/* Writes cannot cross sequential zone boundaries */
|
||||
if (zsp_end != zsp) {
|
||||
mk_sense_buffer(scp, ILLEGAL_REQUEST,
|
||||
@@ -4895,14 +4895,14 @@ static int sdebug_device_create_zones(struct sdebug_dev_info *devip)
|
||||
zsp->z_start = zstart;
|
||||
|
||||
if (i < devip->nr_conv_zones) {
|
||||
zsp->z_type = ZBC_ZONE_TYPE_CNV;
|
||||
zsp->z_type = ZBC_ZTYPE_CNV;
|
||||
zsp->z_cond = ZBC_NOT_WRITE_POINTER;
|
||||
zsp->z_wp = (sector_t)-1;
|
||||
} else {
|
||||
if (devip->zmodel == BLK_ZONED_HM)
|
||||
zsp->z_type = ZBC_ZONE_TYPE_SWR;
|
||||
zsp->z_type = ZBC_ZTYPE_SWR;
|
||||
else
|
||||
zsp->z_type = ZBC_ZONE_TYPE_SWP;
|
||||
zsp->z_type = ZBC_ZTYPE_SWP;
|
||||
zsp->z_cond = ZC1_EMPTY;
|
||||
zsp->z_wp = zsp->z_start;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user