Skip to content

Commit

Permalink
block-dev: enable writeback cgroup support
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Jens Axboe <axboe@fb.com>
  • Loading branch information
shligit authored and axboe committed Mar 3, 2016
1 parent e9137d4 commit 3684aa7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion fs/block_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 3684aa7

Please sign in to comment.