Re: [PATCH 0/7] blk-mq: fix queue quiescing

Bart Van Assche
2017-05-25T17:59:41Z

On Thu, 2017-05-25 at 11:42 -0600, Jens Axboe wrote:
> Why not make it
>=20
> /* Must be the last member - see also blk_mq_hw_ctx_size(). */
> struct srcu_struct queue_rq_srcu[0];
>=20
> and fixup blk_mq_hw_ctx_size()
>=20
> static int blk_mq_hw_ctx_size(struct request_queue *q)
> {
> int size =3D sizeof(struct blk_mq_hw_ctx);
>=20
> if (q->tag_set->flags & BLK_MQ_F_BLOCKING)
> size +=3D sizeof(struct srcu_struct);
>=20
> return size;
> }
>=20
> I think that'd be cleaner. Keep the end-of-struct checking, just to be
> on the safe side.
>=20
> Neither one is super pretty though, and still doesn't fix the fact that
> the srcu_struct is _half_ the blk_mq_hw_ctx in total.

Hello Jens,

Making these changes seems like a good idea to me. I will make these change=
s
and post a patch.

Bart.=