On Tue, Sep 15, 2020 at 04:33:47PM +0900, Damien Le Moal wrote: > Make sure to call sd_zbc_init_disk() when the sdkp->zoned field is > known, that is, once sd_read_block_characteristics() is executed in > sd_revalidate_disk(), so that host-aware disks also get initialized. > To do so, move sd_zbc_init_disk() call in sd_zbc_revalidate_zones() and > make sure to execute it for all zoned disks, including for host-aware > disks used as regular disks as these disk zoned model may be changed > back to BLK_ZONED_HA when partitions are deleted. > > Reported-by: Borislav Petkov <bp@xxxxxxxxx> > Fixes: 5795eb443060 ("scsi: sd_zbc: emulate ZONE_APPEND commands") > Cc: <stable@xxxxxxxxxxxxxxx> # v5.8+ > Signed-off-by: Damien Le Moal <damien.lemoal@xxxxxxx> > Tested-by: Borislav Petkov <bp@xxxxxxx> > Reviewed-by: Johannes Thumshirn <johannes.thumshirn@xxxxxxx> Looks good, Reviewed-by: Christoph Hellwig <hch@xxxxxx>