Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Damien Le Moal" <dlemoal@kernel.org>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH 1/7] block: fail reads to offline zones early
Date: Mon, 05 Oct 2026 10:01:15 +0000	[thread overview]
Message-ID: <20261005100115.9AD261F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20261005094632.580753-2-dlemoal@kernel.org>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] block: split bios bypass early offline zone read check
--

commit 4d9e6f59ea5e83a002020d10f8ee92430c6bfa6f
Author: Damien Le Moal <dlemoal@kernel.org>

block: fail reads to offline zones early

This commit fails read commands targeting offline zones of a zoned block
device early. It checks if the sector belongs to an offline zone in
submit_bio_noacct() and sets the BIO_QUIET flag before completing the bio
with an error.

> diff --git a/block/blk-core.c b/block/blk-core.c
> index 8836c7028568b..a72aa5c18096e 100644
> --- a/block/blk-core.c
> +++ b/block/blk-core.c
> @@ -867,6 +867,11 @@ void submit_bio_noacct(struct bio *bio)
>  
>  	switch (bio_op(bio)) {
>  	case REQ_OP_READ:
> +		if (bdev_is_zoned(bdev) &&
> +		    bdev_zone_is_offline(bdev, bio->bi_iter.bi_sector)) {
> +			bio_set_flag(bio, BIO_QUIET);
> +			goto end_io;
> +		}

[Severity: Medium]
Does this offline zone check get bypassed if a read crosses a zone boundary
into an offline zone?

If a read starts in an online zone but crosses into an offline zone, the
initial sector check passes here. The bio is later split at the zone
boundary by blk_mq_submit_bio() due to chunk_sectors alignment for zoned
devices.

The remainder of the split bio, which now starts exactly in the offline
zone, is then resubmitted by bio_submit_split_bioset() using:

block/blk-merge.c:bio_submit_split_bioset() {
	...
	else if (!blk_throtl_bio(bio))
		submit_bio_noacct_nocheck(bio, true);
	...
}

Because the remainder is submitted via submit_bio_noacct_nocheck(), it skips
submit_bio_noacct() completely. The offline remainder will be issued to
the hardware without the BIO_QUIET flag, potentially causing the noisy
device errors this code is intended to prevent.

>  		break;
>  	case REQ_OP_WRITE:
>  		if (bio->bi_opf & REQ_ATOMIC) {

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261005094632.580753-1-dlemoal@kernel.org?part=1

  reply	other threads:[~2026-10-05 10:01 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-05  9:46 [PATCH 0/7] Add support for storage element depopulation Damien Le Moal
2026-10-05  9:46 ` [PATCH 1/7] block: fail reads to offline zones early Damien Le Moal
2026-10-05 10:01   ` sashiko-bot [this message]
2026-10-05 10:45   ` Hannes Reinecke
2026-10-05  9:46 ` [PATCH 2/7] block: introduce storage element management Damien Le Moal
2026-10-05 10:01   ` sashiko-bot
2026-10-05 10:52   ` Hannes Reinecke
2026-10-05 22:15   ` kernel test robot
2026-10-05  9:46 ` [PATCH 3/7] block: add storage element management ioctls Damien Le Moal
2026-10-05 10:00   ` sashiko-bot
2026-10-05 11:09   ` Hannes Reinecke
2026-10-05  9:46 ` [PATCH 4/7] zloop: add storage element emulation Damien Le Moal
2026-10-05  9:58   ` sashiko-bot
2026-10-05 11:14   ` Hannes Reinecke
2026-10-05  9:46 ` [PATCH 5/7] zloop: add degrade_element control command Damien Le Moal
2026-10-05  9:58   ` sashiko-bot
2026-10-05 11:17   ` Hannes Reinecke
2026-10-05  9:46 ` [PATCH 6/7] scsi: sd_zbc: always revalidate zones for disks supporting head depopulation Damien Le Moal
2026-10-05 11:19   ` Hannes Reinecke
2026-10-05  9:46 ` [PATCH 7/7] scsi: sd_zbc: define storage element management operations Damien Le Moal
2026-10-05  9:59   ` sashiko-bot
2026-10-05 11:48   ` Hannes Reinecke
2026-10-05 20:48   ` kernel test robot
2026-10-05 21:41   ` kernel test robot
2026-10-05 11:13 ` [PATCH 0/7] Add support for storage element depopulation Hannes Reinecke
2026-10-07  7:14   ` Damien Le Moal

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=20261005100115.9AD261F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dlemoal@kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=sashiko-reviews@lists.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