Re: [PATCH 14/14] block: fail reads to offline zones early

Bart Van Assche <[email protected]> Wed, 5 Aug 2026 14:29:15 -0700
Newsgroups org.kernel.vger.linux-block
Message-ID <[email protected]>
On 8/4/26 7:27 PM, Damien Le Moal wrote:
> diff --git a/block/blk-core.c b/block/blk-core.c
> index 80a4e2bcc3f3..a5c4fcd210bb 100644
> --- a/block/blk-core.c
> +++ b/block/blk-core.c
> @@ -866,6 +866,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;
> +		}
>   		break;
>   	case REQ_OP_WRITE:
>   		if (bio->bi_opf & REQ_ATOMIC) {

This change might have a slight negative impact on the performance of 
the hot path for all block devices. Is this change really necessary?

Thanks,

Bart.