Re: [PATCH 04/13] blkcg: introduce common blkg association logic

From: Christoph Hellwig
Date: Fri Nov 30 2018 - 04:52:25 EST


> EXPORT_SYMBOL_GPL(bio_associate_blkcg);
>
> /**
> - * bio_associate_blkg - associate a bio with the a blkg
> + * bio_has_queue - required check for blkg association
> + * @bio: target bio
> + *
> + * A blkg represents the relationship between a blkcg and a request_queue.
> + * If there is no request_queue, there is no blkg and therefore nothing to
> + * associate with.
> + */
> +static inline bool bio_has_queue(struct bio *bio)
> +{
> + return bio->bi_disk && bio->bi_disk->queue;
> +}

How do you ever see a bio without a queue? We can't even do I/O in
that case.