Revert "scsi: sd: Fix wrong zone_write_granularity value during revalidate"
This reverts commit 85d11ded2d
which is
commit 288b3271d920c9ba949c3bab0f749f4cecc70e09 upstream.
It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.
Bug: 161946584
Change-Id: Id190242059387a475ff9d0606360136a610ecf4f
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
parent
eaaff97d11
commit
213d8963dc
@ -3026,13 +3026,8 @@ static void sd_read_block_characteristics(struct scsi_disk *sdkp)
|
||||
}
|
||||
|
||||
if (sdkp->device->type == TYPE_ZBC) {
|
||||
/*
|
||||
* Host-managed: Per ZBC and ZAC specifications, writes in
|
||||
* sequential write required zones of host-managed devices must
|
||||
* be aligned to the device physical block size.
|
||||
*/
|
||||
/* Host-managed */
|
||||
blk_queue_set_zoned(sdkp->disk, BLK_ZONED_HM);
|
||||
blk_queue_zone_write_granularity(q, sdkp->physical_block_size);
|
||||
} else {
|
||||
sdkp->zoned = (buffer[8] >> 4) & 3;
|
||||
if (sdkp->zoned == 1) {
|
||||
|
@ -793,6 +793,14 @@ int sd_zbc_read_zones(struct scsi_disk *sdkp, unsigned char *buf)
|
||||
blk_queue_max_active_zones(q, 0);
|
||||
nr_zones = round_up(sdkp->capacity, zone_blocks) >> ilog2(zone_blocks);
|
||||
|
||||
/*
|
||||
* Per ZBC and ZAC specifications, writes in sequential write required
|
||||
* zones of host-managed devices must be aligned to the device physical
|
||||
* block size.
|
||||
*/
|
||||
if (blk_queue_zoned_model(q) == BLK_ZONED_HM)
|
||||
blk_queue_zone_write_granularity(q, sdkp->physical_block_size);
|
||||
|
||||
/* READ16/WRITE16 is mandatory for ZBC disks */
|
||||
sdkp->device->use_16_for_rw = 1;
|
||||
sdkp->device->use_10_for_rw = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user