Linux block layer
 help / color / mirror / Atom feed
From: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Jens Axboe <axboe@kernel.dk>, Keith Busch <kbusch@kernel.org>,
	 Neptune <z1281552865@gmail.com>, 0wnerD1ed <l7z@0b1t.tech>,
	linux-block@vger.kernel.org
Subject: Re: [PATCH 2/2] block: fix aligning of bounced dio read bios
Date: Wed, 29 Jul 2026 21:26:14 +0900	[thread overview]
Message-ID: <amnwHyJFp0XCXHEp@shinmob> (raw)
In-Reply-To: <20260716091306.316625-3-hch@lst.de>

On Jul 16, 2026 / 11:12, Christoph Hellwig wrote:
> bio_iov_iter_align_down expects the "normal" biovec layout from vector 0,
> while bio_iov_iter_bounce_read abuses vector 0 for a bounce buffer
> allocation.  Pass an explicit bvec to bio_iov_iter_align_down to deal
> with this case to avoid a double unpin.
> 
> Additionally we need to free the folio if no bio_vec could be added,
> and adjust the size of the first bio_vec that contains the bounce buffer
> when the I/O size is aligned down.
> 
> Fixes: e7b8b3c5b2a6 ("block: align down bounces bios")
> Reported-by: 0wnerD1ed <l7z@0b1t.tech>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Tested-by: 0wnerD1ed <l7z@0b1t.tech>
> Reviewed-by: Keith Busch <kbusch@kernel.org>

FYI, 0wnerDied created a GitHub Pull Request to add new blktests test cases as
the regression tests of this fix patch [*]. Now review is ongoing for the test
cases. If any one is interested in, feel free to chime in the review.

[*] https://github.com/linux-blktests/blktests/pull/251

  reply	other threads:[~2026-07-29 12:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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
2026-07-16  9:12 ` [PATCH 2/2] block: fix aligning of bounced dio read bios Christoph Hellwig
2026-07-29 12:26   ` Shin'ichiro Kawasaki [this message]
2026-07-16 12:12 ` bio bounce buffering fixes v3 Jens Axboe
  -- strict thread matches above, loose matches on Subject: below --
2026-07-15  6:42 bio bounce buffering fixes v2 Christoph Hellwig
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

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=amnwHyJFp0XCXHEp@shinmob \
    --to=shinichiro.kawasaki@wdc.com \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=l7z@0b1t.tech \
    --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