/[packages]/cauldron/kernel/current/PATCHES/patches/0087-f2fs-fix-to-account-IO-correctly-for-cgroup-writebac.patch
ViewVC logotype

Contents of /cauldron/kernel/current/PATCHES/patches/0087-f2fs-fix-to-account-IO-correctly-for-cgroup-writebac.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1329221 - (show annotations) (download)
Fri Nov 9 22:05:45 2018 UTC (5 years, 10 months ago) by tmb
File size: 1452 byte(s)
add fixes from sashas autosel queue
1 From 35710f3ec26349872e1675ced3ed7630df2a9041 Mon Sep 17 00:00:00 2001
2 From: Chao Yu <yuchao0@huawei.com>
3 Date: Mon, 22 Oct 2018 23:24:28 +0800
4 Subject: [PATCH 087/145] f2fs: fix to account IO correctly for cgroup
5 writeback
6
7 [ Upstream commit 78efac537de33faab9a4302cc05a70bb4a8b3b63 ]
8
9 Now, we have supported cgroup writeback, it depends on correctly IO
10 account of specified filesystem.
11
12 But in commit d1b3e72d5490 ("f2fs: submit bio of in-place-update pages"),
13 we split write paths from f2fs_submit_page_mbio() to two:
14 - f2fs_submit_page_bio() for IPU path
15 - f2fs_submit_page_bio() for OPU path
16
17 But still we account write IO only in f2fs_submit_page_mbio(), result in
18 incorrect IO account, fix it by adding missing IO account in IPU path.
19
20 Fixes: d1b3e72d5490 ("f2fs: submit bio of in-place-update pages")
21 Signed-off-by: Chao Yu <yuchao0@huawei.com>
22 Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
23 Signed-off-by: Sasha Levin <sashal@kernel.org>
24 ---
25 fs/f2fs/data.c | 4 ++++
26 1 file changed, 4 insertions(+)
27
28 diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
29 index 382c1ef9a9e4..cd5d53353a61 100644
30 --- a/fs/f2fs/data.c
31 +++ b/fs/f2fs/data.c
32 @@ -456,6 +456,10 @@ int f2fs_submit_page_bio(struct f2fs_io_info *fio)
33 bio_put(bio);
34 return -EFAULT;
35 }
36 +
37 + if (fio->io_wbc && !is_read_io(fio->op))
38 + wbc_account_io(fio->io_wbc, page, PAGE_SIZE);
39 +
40 bio_set_op_attrs(bio, fio->op, fio->op_flags);
41
42 __submit_bio(fio->sbi, bio, fio->type);
43 --
44 2.19.1
45

  ViewVC Help
Powered by ViewVC 1.1.30