diff options
| author | Damien Le Moal <[email protected]> | 2020-05-07 11:35:26 +0900 |
|---|---|---|
| committer | Martin K. Petersen <[email protected]> | 2020-05-07 20:45:02 -0400 |
| commit | 108e36f0d8bf91839613d8053a6d1354965801b0 (patch) | |
| tree | 6791e13e7771e7189956788ea3819c4650238ca3 /tools/perf/scripts/python/export-to-postgresql.py | |
| parent | 64e14ece07004f0bf434fe7aad4a6d6411b1d9b6 (diff) | |
scsi: scsi_debug: Disallow zone sizes that are not powers of 2
Allowing a non-power-of-2 zone size forces the use of direct division
operations of 64-bit sector values to obtain a zone number or number of
zones. Doing so without using do_div() leads to compilation errors on
32-bit architectures.
Devices with a zone size that is not a power of 2 do not exist today so
allowing their emulation is of limited interest as the sd driver will not
support them anyway. To fix this compilation error, instead of using
do_div() for sector values divisions, simply disallow zone size values that
are not a power of 2.
[mkp: commit desc]
Link: https://lore.kernel.org/r/[email protected]
Fixes: 98e0a689868c ("scsi: scsi_debug: Add zone_size_mb module parameter")
Fixes: f0d1cf9378bd ("scsi: scsi_debug: Add ZBC zone commands")
Reviewed-by: Johannes Thumshirn <[email protected]>
Acked-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Damien Le Moal <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions