]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
block: add missing group association in bio-cloning functions
authorPaolo Valente <paolo.valente@linaro.org>
Wed, 27 Jul 2016 05:22:05 +0000 (07:22 +0200)
committerKamal Mostafa <kamal@canonical.com>
Mon, 22 Aug 2016 14:42:54 +0000 (07:42 -0700)
commit9145ae89aaa1334c374bdf98517843cc994c1b45
tree8abad623d743258547a00dabcf67eb535859eea8
parent6feb86a497718860a9d52ca8a0da219b19442330
block: add missing group association in bio-cloning functions

BugLink: http://bugs.launchpad.net/bugs/1615620
commit 20bd723ec6a3261df5e02250cd3a1fbb09a343f2 upstream.

When a bio is cloned, the newly created bio must be associated with
the same blkcg as the original bio (if BLK_CGROUP is enabled). If
this operation is not performed, then the new bio is not associated
with any group, and the group of the current task is returned when
the group of the bio is requested.

Depending on the cloning frequency, this may cause a large
percentage of the bios belonging to a given group to be treated
as if belonging to other groups (in most cases as if belonging to
the root group). The expected group isolation may thereby be broken.

This commit adds the missing association in bio-cloning functions.

Fixes: da2f0f74cf7d ("Btrfs: add support for blkio controllers")
Signed-off-by: Paolo Valente <paolo.valente@linaro.org>
Reviewed-by: Nikolay Borisov <kernel@kyup.com>
Reviewed-by: Jeff Moyer <jmoyer@redhat.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
block/bio.c
fs/btrfs/extent_io.c
include/linux/bio.h