OSDN Git Service

scsi: sd_zbc: Rearrange code
authorDamien Le Moal <damien.lemoal@wdc.com>
Fri, 12 Oct 2018 10:08:40 +0000 (19:08 +0900)
committerJens Axboe <axboe@kernel.dk>
Thu, 25 Oct 2018 17:17:39 +0000 (11:17 -0600)
commit7f9d35d24c56576a8c18a8b6f74711c7f3c9c6c0
tree1f5a6cf5938c7dfe6acb856256d07963137c3e3b
parentcdffab7a86b05b207907c391c093023daed5d4a4
scsi: sd_zbc: Rearrange code

Move the urswrz check out of sd_zbc_read_zones() and into
sd_zbc_read_zoned_characteristics() where that value is obtained (read
from the disk zoned characteristics VPD page). Since this function now
does more than simply reading the VPD page, rename it to
sd_zbc_check_zoned_characteristics().
Also fix the error message displayed when reading that VPD page fails.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Acked-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/scsi/sd_zbc.c