aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_mca.c
diff options
context:
space:
mode:
authorShin'ichiro Kawasaki <[email protected]>2023-03-06 06:30:24 +0000
committerMartin K. Petersen <[email protected]>2023-03-06 23:33:13 +0000
commit288b3271d920c9ba949c3bab0f749f4cecc70e09 (patch)
treeb1d87457a1b25e4b5e7db33870e8f868ddf1eb8f /drivers/gpu/drm/amd/amdgpu/amdgpu_mca.c
parentscsi: storvsc: Handle BlockSize change in Hyper-V VHD/VHDX file (diff)
downloadkernel-288b3271d920c9ba949c3bab0f749f4cecc70e09.tar.gz
kernel-288b3271d920c9ba949c3bab0f749f4cecc70e09.zip
scsi: sd: Fix wrong zone_write_granularity value during revalidate
When the sd driver revalidates host-managed SMR disks, it calls disk_set_zoned() which changes the zone_write_granularity attribute value to the logical block size regardless of the device type. After that, the sd driver overwrites the value in sd_zbc_read_zone() with the physical block size, since ZBC/ZAC requires this for host-managed disks. Between the calls to disk_set_zoned() and sd_zbc_read_zone(), there exists a window where the attribute shows the logical block size as the zone_write_granularity value, which is wrong for host-managed disks. The duration of the window is from 20ms to 200ms, depending on report zone command execution time. To avoid the wrong zone_write_granularity value between disk_set_zoned() and sd_zbc_read_zone(), modify the value not in sd_zbc_read_zone() but just after disk_set_zoned() call. Fixes: a805a4fa4fa3 ("block: introduce zone_write_granularity limit") Signed-off-by: Shin'ichiro Kawasaki <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Damien Le Moal <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Reviewed-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_mca.c')
0 files changed, 0 insertions, 0 deletions