On Wed, Sep 30, 2020 at 03:13:29PM +0900, Damien Le Moal wrote: > Upstream commit 27ba3e8ff3ab86449e63d38a8d623053591e65fa > > When CONFIG_BLK_DEV_ZONED is disabled, allow using host-aware ZBC disks as > regular disks. In this case, ensure that command completion is correctly > executed by changing sd_zbc_complete() to return good_bytes instead of 0 > and causing a hang during device probe (endless retries). > > When CONFIG_BLK_DEV_ZONED is enabled and a host-aware disk is detected to > have partitions, it will be used as a regular disk. In this case, make sure > to not do anything in sd_zbc_revalidate_zones() as that triggers warnings. > > Since all these different cases result in subtle settings of the disk queue > zoned model, introduce the block layer helper function > blk_queue_set_zoned() to generically implement setting up the effective > zoned model according to the disk type, the presence of partitions on the > disk and CONFIG_BLK_DEV_ZONED configuration. > > Link: https://lore.kernel.org/r/20200915073347.832424-2-damien.lemoal@xxxxxxx > Fixes: b72053072c0b ("block: allow partitions on host aware zone devices") > Cc: <stable@xxxxxxxxxxxxxxx> > Reported-by: Borislav Petkov <bp@xxxxxxxxx> > Suggested-by: Christoph Hellwig <hch@xxxxxxxxxxxxx> > Reviewed-by: Christoph Hellwig <hch@xxxxxx> > Reviewed-by: Johannes Thumshirn <johannes.thumshirn@xxxxxxx> > Signed-off-by: Damien Le Moal <damien.lemoal@xxxxxxx> > Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx> > --- > block/blk-settings.c | 46 ++++++++++++++++++++++++++++++++++++++++++ > drivers/scsi/sd.c | 30 ++++++++++++++++----------- > drivers/scsi/sd.h | 2 +- > drivers/scsi/sd_zbc.c | 37 +++++++++++++++++++-------------- > include/linux/blkdev.h | 2 ++ > 5 files changed, 89 insertions(+), 28 deletions(-) THanks for both of these, now queued up. greg k-h