Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1323698 > unrolled thread
| Started by | Shaohua Li <shli@fb.com> |
|---|---|
| First post | 2016-02-02 03:00 +0100 |
| Last post | 2016-02-05 18:50 +0100 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] block-dev: enable writeback cgroup support Shaohua Li <shli@fb.com> - 2016-02-02 03:00 +0100
Re: [PATCH] block-dev: enable writeback cgroup support Tejun Heo <tj@kernel.org> - 2016-02-05 18:30 +0100
Re: [PATCH] block-dev: enable writeback cgroup support Shaohua Li <shli@fb.com> - 2016-02-05 18:50 +0100
| From | Shaohua Li <shli@fb.com> |
|---|---|
| Date | 2016-02-02 03:00 +0100 |
| Subject | [PATCH] block-dev: enable writeback cgroup support |
| Message-ID | <qXyq7-3qn-9@gated-at.bofh.it> |
block_dev's .writepages/.writepage already handles
wbc_init_bio/wbc_account_io. We only set the SB_I_CGROUPWB bit to
suppport writeback cgroup support.
Signed-off-by: Shaohua Li <shli@fb.com>
---
fs/block_dev.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/fs/block_dev.c b/fs/block_dev.c
index 7b9cd49..548ded7 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -575,7 +575,11 @@ static const struct super_operations bdev_sops = {
static struct dentry *bd_mount(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data)
{
- return mount_pseudo(fs_type, "bdev:", &bdev_sops, NULL, BDEVFS_MAGIC);
+ struct dentry *dent;
+ dent = mount_pseudo(fs_type, "bdev:", &bdev_sops, NULL, BDEVFS_MAGIC);
+ if (dent)
+ dent->d_sb->s_iflags |= SB_I_CGROUPWB;
+ return dent;
}
static struct file_system_type bd_type = {
--
2.4.6
[toc] | [next] | [standalone]
| From | Tejun Heo <tj@kernel.org> |
|---|---|
| Date | 2016-02-05 18:30 +0100 |
| Message-ID | <qYSmK-3cK-11@gated-at.bofh.it> |
| In reply to | #1323698 |
On Mon, Feb 01, 2016 at 05:50:33PM -0800, Shaohua Li wrote: > block_dev's .writepages/.writepage already handles > wbc_init_bio/wbc_account_io. We only set the SB_I_CGROUPWB bit to > suppport writeback cgroup support. > > Signed-off-by: Shaohua Li <shli@fb.com> Acked-by: Tejun Heo <tj@kernel.org> Can you please describe a bit how you tested it tho? Thanks. -- tejun
[toc] | [prev] | [next] | [standalone]
| From | Shaohua Li <shli@fb.com> |
|---|---|
| Date | 2016-02-05 18:50 +0100 |
| Message-ID | <qYSG6-3jH-17@gated-at.bofh.it> |
| In reply to | #1327958 |
On Fri, Feb 05, 2016 at 12:21:39PM -0500, Tejun Heo wrote: > On Mon, Feb 01, 2016 at 05:50:33PM -0800, Shaohua Li wrote: > > block_dev's .writepages/.writepage already handles > > wbc_init_bio/wbc_account_io. We only set the SB_I_CGROUPWB bit to > > suppport writeback cgroup support. > > > > Signed-off-by: Shaohua Li <shli@fb.com> > > Acked-by: Tejun Heo <tj@kernel.org> > > Can you please describe a bit how you tested it tho? I'm doing a simple buffered write to a disk, assign it to a cgroup and blk-throttle sets wbps for the disk/cgroup. then I'm watching iostat with/without the bit set. Thanks, Shaohua
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web