Re: [PATCH v2 2/2] blk-sysfs: return EINVAL when user modify nr_request less than BLKDEV_MIN_RQ

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

 



On 09/21/2017 09:17 AM, weiping zhang wrote:
> Signed-off-by: weiping zhang <zhangweiping@xxxxxxxxxxxxxxx>
> ---
>  block/blk-sysfs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
> index b8362c0..03a6e19 100644
> --- a/block/blk-sysfs.c
> +++ b/block/blk-sysfs.c
> @@ -75,7 +75,7 @@ queue_requests_store(struct request_queue *q, const char *page, size_t count)
>  		return ret;
>  
>  	if (nr < BLKDEV_MIN_RQ)
> -		nr = BLKDEV_MIN_RQ;
> +		return -EINVAL;

This is potentially breaking existing scripts.

-- 
Jens Axboe




[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