Re: [PATCH BUGFIX] block: add missing group association in bio_split

2016-05-10 Thread Paolo
Il 10/05/2016 18:12, Jeff Moyer ha scritto: Paolo Valente writes: When a bio is split, 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 gro

Re: [PATCH BUGFIX] block: add missing group association in bio_split

2016-05-10 Thread Jeff Moyer
Paolo Valente writes: > When a bio is split, 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

Re: [PATCH BUGFIX] block: add missing group association in bio_split

2016-05-09 Thread Jens Axboe
On 05/09/2016 08:56 AM, Mark Brown wrote: On Mon, May 09, 2016 at 04:39:04PM +0200, Paolo wrote: Il 09/05/2016 16:35, Jeff Moyer ha scritto: Gah, I see that the bi_css member is only present for CONFIG_BLK_CGROUP. I guess we'll have to live with the ifdef. We have already tried to remove i

Re: [PATCH BUGFIX] block: add missing group association in bio_split

2016-05-09 Thread Tejun Heo
On Fri, May 06, 2016 at 10:45:12PM +0200, Paolo Valente wrote: > When a bio is split, 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 gro

Re: [PATCH BUGFIX] block: add missing group association in bio_split

2016-05-09 Thread Mark Brown
On Mon, May 09, 2016 at 04:39:04PM +0200, Paolo wrote: > Il 09/05/2016 16:35, Jeff Moyer ha scritto: > > Gah, I see that the bi_css member is only present for CONFIG_BLK_CGROUP. > > I guess we'll have to live with the ifdef. > We have already tried to remove it, but it seems it would require othe

Re: [PATCH BUGFIX] block: add missing group association in bio_split

2016-05-09 Thread Jens Axboe
On 05/09/2016 08:39 AM, Paolo wrote: Il 09/05/2016 16:35, Jeff Moyer ha scritto: Jeff Moyer writes: Paolo Valente writes: @@ -1811,6 +1811,11 @@ struct bio *bio_split(struct bio *bio, int sectors, bio_advance(bio, split->bi_iter.bi_size); +#ifdef CONFIG_BLK_CGROUP +if (bio->bi_

Re: [PATCH BUGFIX] block: add missing group association in bio_split

2016-05-09 Thread Jeff Moyer
Jeff Moyer writes: > Paolo Valente writes: > >> @@ -1811,6 +1811,11 @@ struct bio *bio_split(struct bio *bio, int sectors, >> >> bio_advance(bio, split->bi_iter.bi_size); >> >> +#ifdef CONFIG_BLK_CGROUP >> +if (bio->bi_css) >> +bio_associate_blkcg(split, bio->bi_css); >>

Re: [PATCH BUGFIX] block: add missing group association in bio_split

2016-05-09 Thread Paolo
Il 09/05/2016 16:35, Jeff Moyer ha scritto: Jeff Moyer writes: Paolo Valente writes: @@ -1811,6 +1811,11 @@ struct bio *bio_split(struct bio *bio, int sectors, bio_advance(bio, split->bi_iter.bi_size); +#ifdef CONFIG_BLK_CGROUP + if (bio->bi_css) + bio_associat

Re: [PATCH BUGFIX] block: add missing group association in bio_split

2016-05-09 Thread Jeff Moyer
Paolo Valente writes: > @@ -1811,6 +1811,11 @@ struct bio *bio_split(struct bio *bio, int sectors, > > bio_advance(bio, split->bi_iter.bi_size); > > +#ifdef CONFIG_BLK_CGROUP > + if (bio->bi_css) > + bio_associate_blkcg(split, bio->bi_css); > +#endif > + > return s