Commit 8a8e6f84 authored by Shaohua Li's avatar Shaohua Li

md/raid0: attach correct cgroup info in bio

The discard bio doesn't attach the original bio cgroup info. Normal bio
is cloned, so is fine.
Signed-off-by: default avatarShaohua Li <shli@fb.com>
parent b5e0fff1
...@@ -2085,7 +2085,7 @@ void bio_clone_blkcg_association(struct bio *dst, struct bio *src) ...@@ -2085,7 +2085,7 @@ void bio_clone_blkcg_association(struct bio *dst, struct bio *src)
if (src->bi_css) if (src->bi_css)
WARN_ON(bio_associate_blkcg(dst, src->bi_css)); WARN_ON(bio_associate_blkcg(dst, src->bi_css));
} }
EXPORT_SYMBOL_GPL(bio_clone_blkcg_association);
#endif /* CONFIG_BLK_CGROUP */ #endif /* CONFIG_BLK_CGROUP */
static void __init biovec_init_slabs(void) static void __init biovec_init_slabs(void)
......
...@@ -539,6 +539,7 @@ static void raid0_handle_discard(struct mddev *mddev, struct bio *bio) ...@@ -539,6 +539,7 @@ static void raid0_handle_discard(struct mddev *mddev, struct bio *bio)
!discard_bio) !discard_bio)
continue; continue;
bio_chain(discard_bio, bio); bio_chain(discard_bio, bio);
bio_clone_blkcg_association(discard_bio, bio);
if (mddev->gendisk) if (mddev->gendisk)
trace_block_bio_remap(bdev_get_queue(rdev->bdev), trace_block_bio_remap(bdev_get_queue(rdev->bdev),
discard_bio, disk_devt(mddev->gendisk), discard_bio, disk_devt(mddev->gendisk),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment