public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* fix unintentional splitting of zone append bios
@ 2024-08-26 17:37 Christoph Hellwig
  2024-08-26 17:37 ` [PATCH 1/4] block: rework bio splitting Christoph Hellwig
                   ` (6 more replies)
  0 siblings, 7 replies; 17+ messages in thread
From: Christoph Hellwig @ 2024-08-26 17:37 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Chris Mason, Josef Bacik, David Sterba, Hans Holmberg,
	Damien Le Moal, Shin'ichiro Kawasaki, linux-block,
	linux-btrfs

Hi Jens,

this series fixes code that incorrectly splits of zoned append bios due
to checking for a wrong max_sectors limit.  A big part of the cause is
that the bio splitting code is a bit of a mess and full of landmines, so
I fixed this as well.

To hit this bug a submitter needs to submit a bio larger than max_sectors
of device, but smaller than max_hw_sectors.  So far the only thing that
reproduces it is my not yet upstream zoned XFS code, but in theory this
could affect every submitter of zone append bios.

Diffstat:
 block/blk-merge.c      |  162 ++++++++++++++++++++++---------------------------
 block/blk-mq.c         |   11 +--
 block/blk.h            |   70 +++++++++++++++------
 fs/btrfs/bio.c         |   30 +++++----
 include/linux/bio.h    |    4 -
 include/linux/blkdev.h |    3 
 6 files changed, 153 insertions(+), 127 deletions(-)

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

end of thread, other threads:[~2024-08-29 10:33 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-26 17:37 fix unintentional splitting of zone append bios Christoph Hellwig
2024-08-26 17:37 ` [PATCH 1/4] block: rework bio splitting Christoph Hellwig
2024-08-26 20:29   ` David Sterba
2024-08-26 22:26   ` Damien Le Moal
2024-08-26 22:37     ` Damien Le Moal
2024-08-27  3:20     ` Christoph Hellwig
2024-08-27  4:08   ` Damien Le Moal
2024-08-26 17:37 ` [PATCH 2/4] block: constify the lim argument to queue_limits_max_zone_append_sectors Christoph Hellwig
2024-08-26 22:27   ` Damien Le Moal
2024-08-26 17:37 ` [PATCH 3/4] block: properly handle REQ_OP_ZONE_APPEND in __bio_split_to_limits Christoph Hellwig
2024-08-26 22:32   ` Damien Le Moal
2024-08-26 17:37 ` [PATCH 4/4] block: don't use bio_split_rw on misc operations Christoph Hellwig
2024-08-26 22:34   ` Damien Le Moal
2024-08-27 11:23 ` fix unintentional splitting of zone append bios Hans Holmberg
2024-08-27 11:43 ` Niklas Cassel
2024-08-27 12:18   ` Christoph Hellwig
2024-08-29 10:33 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox