Re: [PATCH 1/5] null_blk: remove the bio based I/O path

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

 



On 2/15/24 02:25, Keith Busch wrote:
> On Wed, Feb 14, 2024 at 10:54:57AM +0100, Christoph Hellwig wrote:
>> @@ -2036,11 +1813,15 @@ static int null_validate_conf(struct nullb_device *dev)
>>  		pr_err("legacy IO path is no longer available\n");
>>  		return -EINVAL;
>>  	}
>> +	if (dev->queue_mode == NULL_Q_BIO) {
>> +		pr_err("BIO-based IO path is no longer available, using blk-mq instead.\n");
>> +		dev->queue_mode = NULL_Q_MQ;
>> +	}
> 
> Seems pointless to keep dev->queue_mode around if only one value is
> valid.
> 
> Instead of checking the param here once per device, could we do it just
> once for the module in null_set_queue_mode()?

We need the check for the configfs path as well...

> 
> ---
> @@ -134,7 +134,7 @@ static int null_param_store_val(const char *str, int *val, int min, int max)
> 
>  static int null_set_queue_mode(const char *str, const struct kernel_param *kp)
>  {
> -	return null_param_store_val(str, &g_queue_mode, NULL_Q_BIO, NULL_Q_MQ);
> +	return null_param_store_val(str, &g_queue_mode, NULL_Q_MQ, NULL_Q_MQ);
>  }
> 
>  static const struct kernel_param_ops null_queue_mode_param_ops = {
> --
> 

-- 
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