diff options
author | Damien Le Moal <[email protected]> | 2020-09-15 16:33:46 +0900 |
---|---|---|
committer | Martin K. Petersen <[email protected]> | 2020-09-15 20:08:14 -0400 |
commit | 27ba3e8ff3ab86449e63d38a8d623053591e65fa (patch) | |
tree | d8d237c60be3631efa41613ee9e9494194945d3e /net/lapb/lapb_out.c | |
parent | 7f04839ec4483563f38062b4dd90253e45447198 (diff) |
scsi: sd: sd_zbc: Fix handling of host-aware ZBC disks
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/[email protected]
Fixes: b72053072c0b ("block: allow partitions on host aware zone devices")
Cc: <[email protected]>
Reported-by: Borislav Petkov <[email protected]>
Suggested-by: Christoph Hellwig <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Johannes Thumshirn <[email protected]>
Signed-off-by: Damien Le Moal <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'net/lapb/lapb_out.c')
0 files changed, 0 insertions, 0 deletions