Re: [PATCH 06/18] blk-mq: move blk_mq_sched_insert_request to blk-mq.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/12/23 14:32, Christoph Hellwig wrote:
> blk_mq_sched_insert_request is the main request insert helper and not
> directly I/O scheduler related.  Move blk_mq_sched_insert_request to
> blk-mq.c, rename it to blk_mq_insert_request and mark it static.
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> Reviewed-by: Bart Van Assche <bvanassche@xxxxxxx>

[...]

> -void blk_mq_sched_insert_request(struct request *rq, bool at_head,
> -				 bool run_queue, bool async)
> -{
> -	struct request_queue *q = rq->q;
> -	struct elevator_queue *e = q->elevator;
> -	struct blk_mq_ctx *ctx = rq->mq_ctx;
> -	struct blk_mq_hw_ctx *hctx = rq->mq_hctx;
> -
> -	WARN_ON(e && (rq->tag != BLK_MQ_NO_TAG));
> -
> -	if (blk_mq_sched_bypass_insert(hctx, rq)) {

Nit: given the super confusing name that blk_mq_sched_bypass_insert() has,
replacing the above if with:

	if ((rq->rq_flags & RQF_FLUSH_SEQ) || blk_rq_is_passthrough(rq))

with the comment above it would make things even more readable I think.

Otherwise looks good.

Reviewed-by: Damien Le Moal <dlemoal@xxxxxxxxxx>





[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux