diff options
author | Yangtao Li <frank.li@vivo.com> | 2022-12-05 22:56:03 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-12-31 13:32:38 +0100 |
commit | dd203468f07194a5a6e3999f01c3a22d579e9aee (patch) | |
tree | b7a9d27430ebc951c690c3b3544113ec8278fbff /fs/f2fs/segment.c | |
parent | 652b2cdb3007be0fbfc0b9c6bab912ea81bc2b5e (diff) | |
download | linux-stable-dd203468f07194a5a6e3999f01c3a22d579e9aee.tar.gz linux-stable-dd203468f07194a5a6e3999f01c3a22d579e9aee.tar.bz2 linux-stable-dd203468f07194a5a6e3999f01c3a22d579e9aee.zip |
f2fs: fix iostat parameter for discard
[ Upstream commit 15e38ee44d50cad264da80ef75626b9224ddc4a3 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs/f2fs/segment.c')
-rw-r--r-- | fs/f2fs/segment.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index c568821b8463..c1d0713666ee 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -1170,7 +1170,7 @@ submit: 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; start += len; |