Skip to content

Commit

Permalink
scsi-debug-dbg
Browse files Browse the repository at this point in the history
  • Loading branch information
bvanassche committed Apr 18, 2022
1 parent c699299 commit 8a37a38
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/scsi/scsi_debug.c
Expand Up @@ -5054,6 +5054,7 @@ static int sdebug_device_create_zones(struct sdebug_dev_info *devip)
devip->nr_zones = devip->nr_conv_zones + devip->nr_seq_zones;

/* Add gap zones if zone capacity is smaller than the zone size */
pr_info("zcap = %u; zsize = %u\n", devip->zcap, devip->zsize);
if (devip->zcap < devip->zsize)
devip->nr_zones += devip->nr_seq_zones;

Expand Down Expand Up @@ -5096,6 +5097,8 @@ static int sdebug_device_create_zones(struct sdebug_dev_info *devip)
zsp->z_wp = (sector_t)-1;
zsp->z_size = min_t(u64, devip->zsize - devip->zcap,
capacity - zstart);
pr_info("adding a gap zone; start %u; size %u\n",
zsp->z_start, zsp->z_size);
}

WARN_ON_ONCE((int)zsp->z_size <= 0);
Expand Down

0 comments on commit 8a37a38

Please sign in to comment.