]> git.baikalelectronics.ru Git - kernel.git/commit
f2fs: Fix the accounting of dcc->undiscard_blks
authorSahitya Tummala <stummala@codeaurora.org>
Thu, 16 Apr 2020 06:17:41 +0000 (11:47 +0530)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 17 Apr 2020 16:17:00 +0000 (09:17 -0700)
commit74e6450cd40f22d2ac4a10b5959fe6f905715948
treebacc3f517b7b91f2e726d3c84e9d82980089e2fb
parent5a0dee2f99600a871e83b96de20d9ab5166ab415
f2fs: Fix the accounting of dcc->undiscard_blks

When a discard_cmd needs to be split due to dpolicy->max_requests, then
for the remaining length it will be either merged into another cmd or a
new discard_cmd will be created. In this case, there is double
accounting of dcc->undiscard_blks for the remaining len, due to which
it shows incorrect value in stats.

Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/segment.c