mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-01 16:14:13 +08:00
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: b0af6d491a
("f2fs: add app/fs io stat")
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
db8dcd25ec
commit
15e38ee44d
@ -1187,7 +1187,7 @@ static int __submit_discard_cmd(struct f2fs_sb_info *sbi,
|
|||||||
|
|
||||||
atomic_inc(&dcc->issued_discard);
|
atomic_inc(&dcc->issued_discard);
|
||||||
|
|
||||||
f2fs_update_iostat(sbi, NULL, FS_DISCARD, 1);
|
f2fs_update_iostat(sbi, NULL, FS_DISCARD, len * F2FS_BLKSIZE);
|
||||||
|
|
||||||
lstart += len;
|
lstart += len;
|
||||||
start += len;
|
start += len;
|
||||||
|
Loading…
Reference in New Issue
Block a user