OSDN Git Service

scsi: sd: sd_zbc: Hide gap zones
authorDamien Le Moal <damien.lemoal@opensource.wdc.com>
Thu, 21 Apr 2022 18:30:20 +0000 (11:30 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 26 Apr 2022 03:23:05 +0000 (23:23 -0400)
commitc976e588b34e4ff2fdd2922edab4b983244a17e6
treee9599d166f44a320cbe6f84cb3e39c33d065df8c
parent60caf3758103b8edc90724ba781ff119f739162a
scsi: sd: sd_zbc: Hide gap zones

ZBC-2 allows host-managed disks to report gap zones. This allow zoned disks
to report an offset between data zone starts that is a power of two even if
the number of logical blocks with data per zone is not a power of two.

Another new feature in ZBC-2 is support for constant zone starting LBA
offsets. For zoned disks that report a constant zone starting LBA offset,
hide the gap zones from the block layer. Report the offset between data
zone starts as zone size and report the number of logical blocks with data
per zone as the zone capacity.

Link: https://lore.kernel.org/r/20220421183023.3462291-7-bvanassche@acm.org
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
[ bvanassche: Reworked this patch ]
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/sd.h
drivers/scsi/sd_zbc.c
include/scsi/scsi_proto.h