Skip to content

Commit 15e38ee

Browse files
bbkzzJaegeuk Kim
authored andcommitted
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: b0af6d4 ("f2fs: add app/fs io stat") Signed-off-by: Yangtao Li <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
1 parent db8dcd2 commit 15e38ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/f2fs/segment.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1187,7 +1187,7 @@ static int __submit_discard_cmd(struct f2fs_sb_info *sbi,
11871187

11881188
atomic_inc(&dcc->issued_discard);
11891189

1190-
f2fs_update_iostat(sbi, NULL, FS_DISCARD, 1);
1190+
f2fs_update_iostat(sbi, NULL, FS_DISCARD, len * F2FS_BLKSIZE);
11911191

11921192
lstart += len;
11931193
start += len;

0 commit comments

Comments
 (0)