linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH for-next] block: fix req_bio_endio append error handling
@ 2021-10-22 15:01 Pavel Begunkov
  2021-10-22 15:12 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Pavel Begunkov @ 2021-10-22 15:01 UTC (permalink / raw)
  To: linux-block; +Cc: Jens Axboe, Pavel Begunkov, Shinichiro Kawasaki

Shinichiro Kawasaki reports that there is a bug in a recent
req_bio_endio() patch causing problems with zonefs. As Shinichiro
suggested, inverse the condition in zone append path to resemble how it
was before: fail when it's not fully completed.

Fixes: 478eb72b815f3 ("block: optimise req_bio_endio()")
Reported-by: Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
---
 block/blk-mq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/blk-mq.c b/block/blk-mq.c
index d04ee72ba125..c19dfa8ea65e 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -640,7 +640,7 @@ static void req_bio_endio(struct request *rq, struct bio *bio,
 		 * Partial zone append completions cannot be supported as the
 		 * BIO fragments may end up not being written sequentially.
 		 */
-		if (bio->bi_iter.bi_size == nbytes)
+		if (bio->bi_iter.bi_size != nbytes)
 			bio->bi_status = BLK_STS_IOERR;
 		else
 			bio->bi_iter.bi_sector = rq->__sector;
-- 
2.33.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH for-next] block: fix req_bio_endio append error handling
  2021-10-22 15:01 [PATCH for-next] block: fix req_bio_endio append error handling Pavel Begunkov
@ 2021-10-22 15:12 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2021-10-22 15:12 UTC (permalink / raw)
  To: linux-block, Pavel Begunkov; +Cc: Shinichiro Kawasaki

On Fri, 22 Oct 2021 16:01:44 +0100, Pavel Begunkov wrote:
> Shinichiro Kawasaki reports that there is a bug in a recent
> req_bio_endio() patch causing problems with zonefs. As Shinichiro
> suggested, inverse the condition in zone append path to resemble how it
> was before: fail when it's not fully completed.
> 
> 

Applied, thanks!

[1/1] block: fix req_bio_endio append error handling
      commit: 297db731847e7808881ec2123c7564067d594d39

Best regards,
-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-22 15:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-22 15:01 [PATCH for-next] block: fix req_bio_endio append error handling Pavel Begunkov
2021-10-22 15:12 ` Jens Axboe

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).