Re: [REGRESSION] bfq probe failed on 4.19-rc3

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

 



Jens Axboe <axboe@xxxxxxxxx> writes:

>> And then there were 4...
>
> Exactly. I'd bump it to 5 to leave room for one more, if we have to grow it
> again, probably worth it to make it dynamic. So for, not really needed. Takashi,
> can verify that the below fixes it up for you?
>

You can slap a

Reviewed-by: Jeff Moyer <jmoyer@xxxxxxxxxx>

on that when you commit it.

Cheers,
Jeff

>
> diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
> index c19f9078da1e..c630e02836a8 100644
> --- a/block/blk-cgroup.c
> +++ b/block/blk-cgroup.c
> @@ -1510,8 +1510,10 @@ int blkcg_policy_register(struct blkcg_policy *pol)
>  	for (i = 0; i < BLKCG_MAX_POLS; i++)
>  		if (!blkcg_policy[i])
>  			break;
> -	if (i >= BLKCG_MAX_POLS)
> +	if (i >= BLKCG_MAX_POLS) {
> +		pr_warn("blkcg_policy_register: BLKCG_MAX_POLS too small\n");
>  		goto err_unlock;
> +	}
>  
>  	/* Make sure cpd/pd_alloc_fn and cpd/pd_free_fn in pairs */
>  	if ((!pol->cpd_alloc_fn ^ !pol->cpd_free_fn) ||
> diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
> index d6869e0e2b64..6980014357d4 100644
> --- a/include/linux/blkdev.h
> +++ b/include/linux/blkdev.h
> @@ -54,7 +54,7 @@ struct blk_stat_callback;
>   * Maximum number of blkcg policies allowed to be registered concurrently.
>   * Defined here to simplify include dependency.
>   */
> -#define BLKCG_MAX_POLS		3
> +#define BLKCG_MAX_POLS		5
>  
>  typedef void (rq_end_io_fn)(struct request *, blk_status_t);



[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