diff mbox series

[V3,2/6] block: don't pass BIOSET_NEED_BVECS for q->bio_split

Message ID 20210111030557.4154161-3-ming.lei@redhat.com (mailing list archive)
State New, archived
Headers show
Series block: improvement on bioset & bvec allocation | expand

Commit Message

Ming Lei Jan. 11, 2021, 3:05 a.m. UTC
q->bio_split is only used by bio_split() for fast cloning bio, and no
need to allocate bvecs, so remove this flag.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
---
 block/blk-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Pavel Begunkov Jan. 11, 2021, 4:41 a.m. UTC | #1
On 11/01/2021 03:05, Ming Lei wrote:
> q->bio_split is only used by bio_split() for fast cloning bio, and no
> need to allocate bvecs, so remove this flag.
> 
> Reviewed-by: Christoph Hellwig <hch@lst.de>
> Signed-off-by: Ming Lei <ming.lei@redhat.com>

Reviewed-by: Pavel Begunkov <asml.silence@gmail.com>
Tested-by: Pavel Begunkov <asml.silence@gmail.com>

> ---
>  block/blk-core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/block/blk-core.c b/block/blk-core.c
> index 7663a9b94b80..00d415be74e6 100644
> --- a/block/blk-core.c
> +++ b/block/blk-core.c
> @@ -531,7 +531,7 @@ struct request_queue *blk_alloc_queue(int node_id)
>  	if (q->id < 0)
>  		goto fail_q;
>  
> -	ret = bioset_init(&q->bio_split, BIO_POOL_SIZE, 0, BIOSET_NEED_BVECS);
> +	ret = bioset_init(&q->bio_split, BIO_POOL_SIZE, 0, 0);
>  	if (ret)
>  		goto fail_id;
>  
>
Hannes Reinecke Jan. 11, 2021, 6:57 a.m. UTC | #2
On 1/11/21 4:05 AM, Ming Lei wrote:
> q->bio_split is only used by bio_split() for fast cloning bio, and no
> need to allocate bvecs, so remove this flag.
> 
> Reviewed-by: Christoph Hellwig <hch@lst.de>
> Signed-off-by: Ming Lei <ming.lei@redhat.com>
> ---
>   block/blk-core.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/block/blk-core.c b/block/blk-core.c
> index 7663a9b94b80..00d415be74e6 100644
> --- a/block/blk-core.c
> +++ b/block/blk-core.c
> @@ -531,7 +531,7 @@ struct request_queue *blk_alloc_queue(int node_id)
>   	if (q->id < 0)
>   		goto fail_q;
>   
> -	ret = bioset_init(&q->bio_split, BIO_POOL_SIZE, 0, BIOSET_NEED_BVECS);
> +	ret = bioset_init(&q->bio_split, BIO_POOL_SIZE, 0, 0);
>   	if (ret)
>   		goto fail_id;
>   
> 
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
diff mbox series

Patch

diff --git a/block/blk-core.c b/block/blk-core.c
index 7663a9b94b80..00d415be74e6 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -531,7 +531,7 @@  struct request_queue *blk_alloc_queue(int node_id)
 	if (q->id < 0)
 		goto fail_q;
 
-	ret = bioset_init(&q->bio_split, BIO_POOL_SIZE, 0, BIOSET_NEED_BVECS);
+	ret = bioset_init(&q->bio_split, BIO_POOL_SIZE, 0, 0);
 	if (ret)
 		goto fail_id;