[v3,3/7] block: rename blk_mq_alloc_rq_maps
diff mbox series

Message ID dc8ec91cff01d55ab21a11ffc745023dd223627c.1586199103.git.zhangweiping@didiglobal.com
State New
Headers show
Series
  • Fix potential kernel panic when increase hardware queue
Related show

Commit Message

Weiping Zhang April 6, 2020, 7:36 p.m. UTC
rename blk_mq_alloc_rq_maps to blk_mq_alloc_rq_map_and_requests,
this function alloc both map and request, make function name
align with function.

Signed-off-by: Weiping Zhang <zhangweiping@didiglobal.com>
---
 block/blk-mq.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Bart Van Assche April 20, 2020, 8:47 p.m. UTC | #1
On 4/6/20 12:36 PM, Weiping Zhang wrote:
> rename blk_mq_alloc_rq_maps to blk_mq_alloc_rq_map_and_requests,
> this function alloc both map and request, make function name
> align with function.
> 
> Signed-off-by: Weiping Zhang <zhangweiping@didiglobal.com>
> ---
>   block/blk-mq.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/block/blk-mq.c b/block/blk-mq.c
> index 5a322130aaf2..4692e8232699 100644
> --- a/block/blk-mq.c
> +++ b/block/blk-mq.c
> @@ -3000,7 +3000,7 @@ static int __blk_mq_alloc_rq_map_and_requests(struct blk_mq_tag_set *set)
>    * may reduce the depth asked for, if memory is tight. set->queue_depth
>    * will be updated to reflect the allocated depth.
>    */
> -static int blk_mq_alloc_rq_maps(struct blk_mq_tag_set *set)
> +static int blk_mq_alloc_rq_map_and_requests(struct blk_mq_tag_set *set)
>   {
>   	unsigned int depth;
>   	int err;
> @@ -3160,7 +3160,7 @@ int blk_mq_alloc_tag_set(struct blk_mq_tag_set *set)
>   	if (ret)
>   		goto out_free_mq_map;
>   
> -	ret = blk_mq_alloc_rq_maps(set);
> +	ret = blk_mq_alloc_rq_map_and_requests(set);
>   	if (ret)
>   		goto out_free_mq_map;

Personally I'm fine with the current name of this function. However, 
others may have another opinion.

Thanks,

Bart.

Patch
diff mbox series

diff --git a/block/blk-mq.c b/block/blk-mq.c
index 5a322130aaf2..4692e8232699 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -3000,7 +3000,7 @@  static int __blk_mq_alloc_rq_map_and_requests(struct blk_mq_tag_set *set)
  * may reduce the depth asked for, if memory is tight. set->queue_depth
  * will be updated to reflect the allocated depth.
  */
-static int blk_mq_alloc_rq_maps(struct blk_mq_tag_set *set)
+static int blk_mq_alloc_rq_map_and_requests(struct blk_mq_tag_set *set)
 {
 	unsigned int depth;
 	int err;
@@ -3160,7 +3160,7 @@  int blk_mq_alloc_tag_set(struct blk_mq_tag_set *set)
 	if (ret)
 		goto out_free_mq_map;
 
-	ret = blk_mq_alloc_rq_maps(set);
+	ret = blk_mq_alloc_rq_map_and_requests(set);
 	if (ret)
 		goto out_free_mq_map;