[PATCH v6 1/8] block: convert nr_requests to unsigned int

Yu Kuai posted 8 patches 1 week, 3 days ago
[PATCH v6 1/8] block: convert nr_requests to unsigned int
Posted by Yu Kuai 1 week, 3 days ago
This value represents the number of requests for elevator tags, or drivers
tags if elevator is none. The max value for elevator tags is 2048, and
in drivers at most 16 bits is used for tag.

Signed-off-by: Yu Kuai <yukuai@fnnas.com>
Reviewed-by: Nilay Shroff <nilay@linux.ibm.com>
---
 include/linux/blkdev.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index cb4ba09959ee..cdc68c41fa96 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -551,7 +551,7 @@ struct request_queue {
 	/*
 	 * queue settings
 	 */
-	unsigned long		nr_requests;	/* Max # of requests */
+	unsigned int		nr_requests;	/* Max # of requests */
 
 #ifdef CONFIG_BLK_INLINE_ENCRYPTION
 	struct blk_crypto_profile *crypto_profile;
-- 
2.51.0
Re: [PATCH v6 1/8] block: convert nr_requests to unsigned int
Posted by Hannes Reinecke 1 week, 3 days ago
On 11/21/25 06:28, Yu Kuai wrote:
> This value represents the number of requests for elevator tags, or drivers
> tags if elevator is none. The max value for elevator tags is 2048, and
> in drivers at most 16 bits is used for tag.
> 
> Signed-off-by: Yu Kuai <yukuai@fnnas.com>
> Reviewed-by: Nilay Shroff <nilay@linux.ibm.com>
> ---
>   include/linux/blkdev.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
> index cb4ba09959ee..cdc68c41fa96 100644
> --- a/include/linux/blkdev.h
> +++ b/include/linux/blkdev.h
> @@ -551,7 +551,7 @@ struct request_queue {
>   	/*
>   	 * queue settings
>   	 */
> -	unsigned long		nr_requests;	/* Max # of requests */
> +	unsigned int		nr_requests;	/* Max # of requests */
>   
>   #ifdef CONFIG_BLK_INLINE_ENCRYPTION
>   	struct blk_crypto_profile *crypto_profile;

Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                  Kernel Storage Architect
hare@suse.de                                +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich