Skip to content

ki/Mi/Gi/etc parsed incorrectly when kb_base=1000 #1618

Open
@kotarou3

Description

@kotarou3

Please acknowledge the following before creating a ticket

Description of the bug:
When (byte) sizes are specified with the ki/Mi/Gi/etc units, they are parsed as 10³B/10⁶B/10⁹B when kb_base=1000 rather than the expected 2¹⁰B/2²⁰B/2³⁰B.
Notably, if I change the units to kiB/MiB/GiB instead, then they are parsed correctly as 2¹⁰B/2²⁰B/2³⁰B

It seems like ki/Mi/Gi are being parsed as if they didn't have the "i" suffix at all?

Environment:

$ uname -a
Linux home.kota.moe 6.4.0-2-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.4.4-3 (2023-08-08) x86_64 GNU/Linux
$ lsb_release -d
Description:	Debian GNU/Linux trixie/sid

fio version: fio-3.35

Reproduction steps
Blocksize incorrectly parsed as 4000B

[global]
kb_base=1000
size=1Mi
blocksize=4ki
rw=randread

[read-4ki-qd1]
iodepth=1

read-4ki-qd1: (g=0): rw=randread, bs=(R) 4000B-4000B, (W) 4000B-4000B, (T) 4000B-4000B, ioengine=psync, iodepth=1

Blocksize correctly parsed as 4096B:

[global]
kb_base=1000
size=1MiB
blocksize=4kiB
rw=randread

[read-4ki-qd1]
iodepth=1

read-4ki-qd1: (g=0): rw=randread, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=psync, iodepth=1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions