summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/super.c
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2020-11-27 21:20:06 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2020-12-02 22:00:22 -0800
commit3a0a9cbc44bbb8a23a3fc12edfd1834452360a50 (patch)
tree659f3cf7f5c0a1f69eda2a8b44e5f084f56f4cf8 /fs/f2fs/super.c
parentb28f047b28c51d0b9864c34b097bb0b221ea7247 (diff)
downloadlinux-3a0a9cbc44bbb8a23a3fc12edfd1834452360a50.tar.bz2
f2fs: fix kbytes written stat for multi-device case
For multi-device case, one f2fs image includes multi devices, so it needs to account bytes written of all block devices belong to the image rather than one main block device, fix it. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/super.c')
-rw-r--r--fs/f2fs/super.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index f3d919ee4dee..0ac4dbd6488a 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -3701,10 +3701,7 @@ try_onemore:
}
/* For write statistics */
- if (sb->s_bdev->bd_part)
- sbi->sectors_written_start =
- (u64)part_stat_read(sb->s_bdev->bd_part,
- sectors[STAT_WRITE]);
+ sbi->sectors_written_start = f2fs_get_sectors_written(sbi);
/* Read accumulated write IO statistics if exists */
seg_i = CURSEG_I(sbi, CURSEG_HOT_NODE);