On Mon, Feb 28, 2022 at 05:04:27PM +0800, Ming Lei wrote: > queue map can be changed when updating nr_hw_queues, so we need to > re-config queue's poll capability. Add one helper for doing this job. s/re-config/reconfigure/g > +static void blk_mq_config_poll(struct request_queue *q) > +{ > + struct blk_mq_tag_set *set = q->tag_set; > + > + if (set->nr_maps > HCTX_TYPE_POLL && > + set->map[HCTX_TYPE_POLL].nr_queues) > + blk_queue_flag_set(QUEUE_FLAG_POLL, q); > + else > + blk_queue_flag_clear(QUEUE_FLAG_POLL, q); > +} Maybe name this blk_mq_update_poll_flag?