f2fs: fix iostat parameter for discard
authorYangtao Li <frank.li@vivo.com>
Mon, 5 Dec 2022 14:56:03 +0000 (22:56 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Mon, 12 Dec 2022 22:59:38 +0000 (14:59 -0800)
commit15e38ee44d50cad264da80ef75626b9224ddc4a3
tree886fbbcb3b4ed72b1613090bb539cfa9cf90b824
parentdb8dcd25ec84120d4e57a7f17a566825cec17ae8
f2fs: fix iostat parameter for discard

Just like other data we count uses the number of bytes as the basic unit,
but discard uses the number of cmds as the statistical unit. In fact the
discard command contains the number of blocks, so let's change to the
number of bytes as the base unit.

Fixes: b0af6d491a6b ("f2fs: add app/fs io stat")
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/segment.c