From: Hannes Reinecke <hare@suse.de>
To: Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>
Cc: Christian Brauner <brauner@kernel.org>,
"Darrick J. Wong" <djwong@kernel.org>,
Pankaj Raghav <pankaj.raghav@linux.dev>,
linux-block@vger.kernel.org, linux-xfs@vger.kernel.org,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 2/2] block: align down bounces bios
Date: Mon, 11 May 2026 12:40:47 +0200 [thread overview]
Message-ID: <2be5b81c-a7c2-40ed-9d90-4129669a9a6c@suse.de> (raw)
In-Reply-To: <20260507050153.1298375-3-hch@lst.de>
On 5/7/26 07:01, Christoph Hellwig wrote:
> Just like for the extract user pages path, we need to align down the
> size to the supported boundary.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> block/bio.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/block/bio.c b/block/bio.c
> index f3e5d8bea08c..5f10900b3f42 100644
> --- a/block/bio.c
> +++ b/block/bio.c
> @@ -1345,7 +1345,7 @@ static int bio_iov_iter_bounce_write(struct bio *bio, struct iov_iter *iter,
>
> if (!bio->bi_iter.bi_size)
> return -ENOMEM;
> - return 0;
> + return bio_iov_iter_align_down(bio, iter, minsize - 1);
> }
>
> static int bio_iov_iter_bounce_read(struct bio *bio, struct iov_iter *iter,
> @@ -1383,7 +1383,7 @@ static int bio_iov_iter_bounce_read(struct bio *bio, struct iov_iter *iter,
> bvec_set_folio(&bio->bi_io_vec[0], folio, bio->bi_iter.bi_size, 0);
> if (iov_iter_extract_will_pin(iter))
> bio_set_flag(bio, BIO_PAGE_PINNED);
> - return 0;
> + return bio_iov_iter_align_down(bio, iter, minsize - 1);
> }
>
> /**
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-05-11 10:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-07 5:01 fix block layer bounce buffering for block size > PAGE_SIZE v2 Christoph Hellwig
2026-05-07 5:01 ` [PATCH 1/2] block: pass a minsize argument to bio_iov_iter_bounce Christoph Hellwig
2026-05-07 11:36 ` Pankaj Raghav (Samsung)
2026-05-08 8:12 ` Christoph Hellwig
2026-05-11 10:40 ` Hannes Reinecke
2026-05-07 5:01 ` [PATCH 2/2] block: align down bounces bios Christoph Hellwig
2026-05-11 10:40 ` Hannes Reinecke [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-04-30 13:20 fix block layer bounce buffering for block size > PAGE_SIZE Christoph Hellwig
2026-04-30 13:20 ` [PATCH 2/2] block: align down bounces bios 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=2be5b81c-a7c2-40ed-9d90-4129669a9a6c@suse.de \
--to=hare@suse.de \
--cc=axboe@kernel.dk \
--cc=brauner@kernel.org \
--cc=djwong@kernel.org \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=pankaj.raghav@linux.dev \
/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