linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Niklas Cassel <cassel@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: Jens Axboe <axboe@kernel.dk>, Chris Mason <clm@fb.com>,
	Josef Bacik <josef@toxicpanda.com>,
	David Sterba <dsterba@suse.com>,
	Hans Holmberg <Hans.Holmberg@wdc.com>,
	Damien Le Moal <dlemoal@kernel.org>,
	Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>,
	linux-block@vger.kernel.org, linux-btrfs@vger.kernel.org
Subject: Re: fix unintentional splitting of zone append bios
Date: Tue, 27 Aug 2024 13:43:44 +0200	[thread overview]
Message-ID: <Zs278OxdBpn-i9ss@ryzen.lan> (raw)
In-Reply-To: <20240826173820.1690925-1-hch@lst.de>

On Mon, Aug 26, 2024 at 07:37:53PM +0200, Christoph Hellwig wrote:
> 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.

Hello Christoph,

You say that this series fixes code that could affect every submitter of
zone append bios, thus I am a bit surprised to not see any Fixes-tag(s)
in any of the patches in this series. Was that intentional?

Even for a theoretical fix, doesn't this sound serious enough to warrant
zone append splits to be fixed in stable kernels as well?

When was this bug introduced? Or has it been broken since the support for
zone append was first added?


Kind regards,
Niklas


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

  parent reply	other threads:[~2024-08-27 11:43 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2024-08-27 12:18   ` Christoph Hellwig
2024-08-29 10:33 ` Jens Axboe

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=Zs278OxdBpn-i9ss@ryzen.lan \
    --to=cassel@kernel.org \
    --cc=Hans.Holmberg@wdc.com \
    --cc=axboe@kernel.dk \
    --cc=clm@fb.com \
    --cc=dlemoal@kernel.org \
    --cc=dsterba@suse.com \
    --cc=hch@lst.de \
    --cc=josef@toxicpanda.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=shinichiro.kawasaki@wdc.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;
as well as URLs for NNTP newsgroup(s).