From: Hannes Reinecke <hare@suse.de>
To: Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>
Cc: Keith Busch <kbusch@kernel.org>, Neptune <z1281552865@gmail.com>,
linux-block@vger.kernel.org
Subject: Re: [PATCH 1/2] block: handle huge zero folios in bio_free_folios
Date: Wed, 15 Jul 2026 09:04:44 +0200 [thread overview]
Message-ID: <d55cbfc0-a08a-4c65-ba2d-9154768a8f01@suse.de> (raw)
In-Reply-To: <20260715064215.2934345-2-hch@lst.de>
On 7/15/26 8:42 AM, Christoph Hellwig wrote:
> When CONFIG_PERSISTENT_HUGE_ZERO_FOLIO is enabled, iomap_dio_zero() can
> add a huge zero folio to a zeroing bio, which needs special treatment
> in bio_free_folios by also checking is_huge_zero_folio() in addition to
> is_zero_folio().
>
> Fixes: 8dd5e7c75d7b ("block: add helpers to bounce buffer an iov_iter into bios")
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> block/bio.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/block/bio.c b/block/bio.c
> index f2a5f4d0a967..4d6e5f5f5710 100644
> --- a/block/bio.c
> +++ b/block/bio.c
> @@ -1302,7 +1302,7 @@ static void bio_free_folios(struct bio *bio)
> bio_for_each_bvec_all(bv, bio, i) {
> struct folio *folio = bvec_folio(bv);
>
> - if (!is_zero_folio(folio))
> + if (!is_zero_folio(folio) && !is_huge_zero_folio(folio))
> folio_put(folio);
> }
> }
Reviewed-by: Hannes Reinecke <hare@kernel.org>
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
next prev parent reply other threads:[~2026-07-15 7:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-15 6:42 bio bounce buffering fixes v2 Christoph Hellwig
2026-07-15 6:42 ` [PATCH 1/2] block: handle huge zero folios in bio_free_folios Christoph Hellwig
2026-07-15 7:04 ` Hannes Reinecke [this message]
2026-07-15 6:42 ` [PATCH 2/2] block: fix aligning of bounced dio read bios Christoph Hellwig
2026-07-15 7:07 ` Hannes Reinecke
-- strict thread matches above, loose matches on Subject: below --
2026-07-16 9:12 bio bounce buffering fixes v3 Christoph Hellwig
2026-07-16 9:12 ` [PATCH 1/2] block: handle huge zero folios in bio_free_folios Christoph Hellwig
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=d55cbfc0-a08a-4c65-ba2d-9154768a8f01@suse.de \
--to=hare@suse.de \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=z1281552865@gmail.com \
/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