]> git.pld-linux.org Git - packages/kernel.git/blob - kernel-small_fixes.patch
5ef9dd5e54ea0bd1541d899c41dee2828f50eead
[packages/kernel.git] / kernel-small_fixes.patch
1 From: Shaohua Li <shli@fb.com>
2
3 Basically this is a copy of commit 001e4a8775f6(ext4: implement cgroup
4 writeback support). Tested with a fio test, verified writeback is
5 throttled against cgroup io.max write bandwidth, also verified moving
6 the fio test to another cgroup and the writeback is throttled against
7 new cgroup setting.
8
9 Cc: Tejun Heo <tj@kernel.org>
10 Signed-off-by: Shaohua Li <shli@fb.com>
11 ---
12  fs/xfs/xfs_aops.c  | 2 ++
13  fs/xfs/xfs_super.c | 1 +
14  2 files changed, 3 insertions(+)
15
16 diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c
17 index f18e593..6535054 100644
18 --- a/fs/xfs/xfs_aops.c
19 +++ b/fs/xfs/xfs_aops.c
20 @@ -613,8 +613,10 @@ xfs_add_to_ioend(
21                         list_add(&wpc->ioend->io_list, iolist);
22                 wpc->ioend = xfs_alloc_ioend(inode, wpc->io_type, offset,
23                                 bdev, sector);
24 +               wbc_init_bio(wbc, wpc->ioend->io_bio);
25         }
26  
27 +       wbc_account_io(wbc, bh->b_page, bh->b_size);
28         if (!__bio_try_merge_page(wpc->ioend->io_bio, page, len, poff)) {
29                 if (iop)
30                         atomic_inc(&iop->write_count);
31 diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
32 index 584cf2d..aea3bc2 100644
33 --- a/fs/xfs/xfs_super.c
34 +++ b/fs/xfs/xfs_super.c
35 @@ -1634,6 +1634,7 @@ xfs_fs_fill_super(
36         sb->s_max_links = XFS_MAXLINK;
37         sb->s_time_gran = 1;
38         set_posix_acl_flag(sb);
39 +       sb->s_iflags |= SB_I_CGROUPWB;
40  
41         /* version 5 superblocks support inode version counters. */
42         if (XFS_SB_VERSION_NUM(&mp->m_sb) == XFS_SB_VERSION_5)
This page took 0.023393 seconds and 3 git commands to generate.