Re: [PATCH 2/3] block/mq-deadline: Introduce dd_bio_ioclass()

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

 



On 12/5/23 14:32, Bart Van Assche wrote:
> Prepare for disabling I/O prioritization in certain cases.
> 
> Cc: Damien Le Moal <dlemoal@xxxxxxxxxx>
> Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx>

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

> ---
>  block/mq-deadline.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/block/mq-deadline.c b/block/mq-deadline.c
> index e558f3660357..fe5da2ade953 100644
> --- a/block/mq-deadline.c
> +++ b/block/mq-deadline.c
> @@ -128,6 +128,11 @@ static u8 dd_rq_ioclass(struct request *rq)
>  	return IOPRIO_PRIO_CLASS(req_get_ioprio(rq));
>  }
>  
> +static u8 dd_bio_ioclass(struct bio *bio)
> +{
> +	return IOPRIO_PRIO_CLASS(bio->bi_ioprio);
> +}
> +
>  /*
>   * get the request before `rq' in sector-sorted order
>   */
> @@ -744,7 +749,7 @@ static int dd_request_merge(struct request_queue *q, struct request **rq,
>  			    struct bio *bio)
>  {
>  	struct deadline_data *dd = q->elevator->elevator_data;
> -	const u8 ioprio_class = IOPRIO_PRIO_CLASS(bio->bi_ioprio);
> +	const u8 ioprio_class = dd_bio_ioclass(bio);
>  	const enum dd_prio prio = ioprio_class_to_prio[ioprio_class];
>  	struct dd_per_prio *per_prio = &dd->per_prio[prio];
>  	sector_t sector = bio_end_sector(bio);

-- 
Damien Le Moal
Western Digital Research





[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