From: Christoph Hellwig <hch@lst.de>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org
Subject: [PATCH 1/2] block: remove bio_add_hw_folio
Date: Tue, 5 Nov 2024 16:52:30 +0100 [thread overview]
Message-ID: <20241105155235.460088-2-hch@lst.de> (raw)
In-Reply-To: <20241105155235.460088-1-hch@lst.de>
The only user of bio_add_hw_folio was removed in commit cafd00d0e909
("block: remove zone append special casing from the direct I/O path"),
so remove it as well.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
block/bio.c | 23 -----------------------
block/blk.h | 4 ----
2 files changed, 27 deletions(-)
diff --git a/block/bio.c b/block/bio.c
index daceb0a5c1d7..1f6ac44b4881 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -1017,29 +1017,6 @@ int bio_add_hw_page(struct request_queue *q, struct bio *bio,
return len;
}
-/**
- * bio_add_hw_folio - attempt to add a folio to a bio with hw constraints
- * @q: the target queue
- * @bio: destination bio
- * @folio: folio to add
- * @len: vec entry length
- * @offset: vec entry offset in the folio
- * @max_sectors: maximum number of sectors that can be added
- * @same_page: return if the segment has been merged inside the same folio
- *
- * Add a folio to a bio while respecting the hardware max_sectors, max_segment
- * and gap limitations.
- */
-int bio_add_hw_folio(struct request_queue *q, struct bio *bio,
- struct folio *folio, size_t len, size_t offset,
- unsigned int max_sectors, bool *same_page)
-{
- if (len > UINT_MAX || offset > UINT_MAX)
- return 0;
- return bio_add_hw_page(q, bio, folio_page(folio, 0), len, offset,
- max_sectors, same_page);
-}
-
/**
* bio_add_pc_page - attempt to add page to passthrough bio
* @q: the target queue
diff --git a/block/blk.h b/block/blk.h
index 63d5df0dc29c..837a57ed1911 100644
--- a/block/blk.h
+++ b/block/blk.h
@@ -569,10 +569,6 @@ int bio_add_hw_page(struct request_queue *q, struct bio *bio,
struct page *page, unsigned int len, unsigned int offset,
unsigned int max_sectors, bool *same_page);
-int bio_add_hw_folio(struct request_queue *q, struct bio *bio,
- struct folio *folio, size_t len, size_t offset,
- unsigned int max_sectors, bool *same_page);
-
/*
* Clean up a page appropriately, where the page may be pinned, may have a
* ref taken on it or neither.
--
2.45.2
next prev parent reply other threads:[~2024-11-05 15:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-05 15:52 bio_add_* cleanups Christoph Hellwig
2024-11-05 15:52 ` Christoph Hellwig [this message]
2024-11-06 9:54 ` [PATCH 1/2] block: remove bio_add_hw_folio Kundan Kumar
2024-11-05 15:52 ` [PATCH 2/2] block: share more code for bio addition helpers Christoph Hellwig
2024-11-06 10:03 ` Kundan Kumar
2024-11-07 7:20 ` Christoph Hellwig
2024-11-07 9:10 ` Kundan Kumar
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=20241105155235.460088-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).