From: Christoph Hellwig <hch@lst.de>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org
Subject: [PATCH 1/3] block: mark bvec_{alloc,free} static
Date: Mon, 16 Mar 2026 17:11:29 +0100	[thread overview]
Message-ID: <20260316161144.1607877-2-hch@lst.de> (raw)
In-Reply-To: <20260316161144.1607877-1-hch@lst.de>

Only used in bio.c these days.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 block/bio.c | 7 +++++--
 block/blk.h | 5 -----
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/block/bio.c b/block/bio.c
index bf1f3670e85a..6131ccb7284a 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -34,6 +34,8 @@ struct bio_alloc_cache {
 	unsigned int		nr_irq;
 };
 
+#define BIO_INLINE_VECS 4
+
 static struct biovec_slab {
 	int nr_vecs;
 	char *name;
@@ -159,7 +161,8 @@ static void bio_put_slab(struct bio_set *bs)
 	mutex_unlock(&bio_slab_lock);
 }
 
-void bvec_free(mempool_t *pool, struct bio_vec *bv, unsigned short nr_vecs)
+static void bvec_free(struct mempool *pool, struct bio_vec *bv,
+		      unsigned short nr_vecs)
 {
 	BUG_ON(nr_vecs > BIO_MAX_VECS);
 
@@ -179,7 +182,7 @@ static inline gfp_t bvec_alloc_gfp(gfp_t gfp)
 		__GFP_NOMEMALLOC | __GFP_NORETRY | __GFP_NOWARN;
 }
 
-struct bio_vec *bvec_alloc(mempool_t *pool, unsigned short *nr_vecs,
+static struct bio_vec *bvec_alloc(struct mempool *pool, unsigned short *nr_vecs,
 		gfp_t gfp_mask)
 {
 	struct biovec_slab *bvs = biovec_slab(*nr_vecs);
diff --git a/block/blk.h b/block/blk.h
index c5b2115b9ea4..103cb1d0b9cb 100644
--- a/block/blk.h
+++ b/block/blk.h
@@ -108,11 +108,6 @@ static inline void blk_wait_io(struct completion *done)
 struct block_device *blkdev_get_no_open(dev_t dev, bool autoload);
 void blkdev_put_no_open(struct block_device *bdev);
 
-#define BIO_INLINE_VECS 4
-struct bio_vec *bvec_alloc(mempool_t *pool, unsigned short *nr_vecs,
-		gfp_t gfp_mask);
-void bvec_free(mempool_t *pool, struct bio_vec *bv, unsigned short nr_vecs);
-
 bool bvec_try_merge_hw_page(struct request_queue *q, struct bio_vec *bv,
 		struct page *page, unsigned len, unsigned offset);
 
-- 
2.47.3


  reply	other threads:[~2026-03-16 16:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-16 16:11 bio allocation cleanups Christoph Hellwig
2026-03-16 16:11 ` Christoph Hellwig [this message]
2026-03-17 13:38   ` [PATCH 1/3] block: mark bvec_{alloc,free} static Johannes Thumshirn
2026-03-18  0:26   ` Chaitanya Kulkarni
2026-03-16 16:11 ` [PATCH 2/3] block: split bio_alloc_bioset more clearly into a fast and slowpath Christoph Hellwig
2026-03-18  0:27   ` Chaitanya Kulkarni
2026-03-16 16:11 ` [PATCH 3/3] block: remove bvec_free Christoph Hellwig
2026-03-17 13:40   ` Johannes Thumshirn
2026-03-18  0:27   ` Chaitanya Kulkarni
2026-03-18  1:21 ` bio allocation cleanups Martin K. Petersen
2026-03-18  1:27 ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260316161144.1607877-2-hch@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.