[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20181203225222.GA3801@dennisz-mbp.dhcp.thefacebook.com>
Date: Mon, 3 Dec 2018 17:52:22 -0500
From: Dennis Zhou <dennis@...nel.org>
To: Christoph Hellwig <hch@...radead.org>
Cc: Dennis Zhou <dennis@...nel.org>, Jens Axboe <axboe@...nel.dk>,
Tejun Heo <tj@...nel.org>,
Johannes Weiner <hannes@...xchg.org>,
Josef Bacik <josef@...icpanda.com>, kernel-team@...com,
linux-block@...r.kernel.org, cgroups@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 05/13] blkcg: associate blkg when associating a device
On Fri, Nov 30, 2018 at 01:54:26AM -0800, Christoph Hellwig wrote:
> > diff --git a/include/linux/bio.h b/include/linux/bio.h
> > index 62715a5a4f32..8bc9d9b29fd3 100644
> > --- a/include/linux/bio.h
> > +++ b/include/linux/bio.h
> > @@ -486,6 +486,12 @@ extern unsigned int bvec_nr_vecs(unsigned short idx);
> > extern const char *bio_devname(struct bio *bio, char *buffer);
> >
> > #define bio_set_dev(bio, bdev) \
> > +do { \
> > + bio_set_dev_only(bio, bdev); \
> > + bio_associate_blkg(bio); \
> > +} while (0)
> > +
> > +#define bio_set_dev_only(bio, bdev) \
>
> This lacks any explanation on when you would use bio_set_dev_only or
> bio_set_dev. Please document why we need both and why you'd choose or
> the other.
I realized after thinking about this more and checking more use cases
that it isn't as simple as swapping macro uses because many of the
callers share common bio allocation paths. I think the simplest way
forward is to have writeback and swap do reassociation and split out bio
init code in a future series. So in v5, there is only bio_set_dev().
Thanks,
Dennis
Powered by blists - more mailing lists