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

Damien Le Moal <[email protected]> Thu, 6 Aug 2026 08:52:20 -0700
Newsgroups org.kernel.vger.linux-block
Organization Western Digital Research
Message-ID <[email protected]>
On 2026/08/05 14:29, Bart Van Assche wrote:
> 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?

It is mostly intended to avoid command failures with SATA SMR drives, because
NCQ failures with SATA are costly for performance (queue drain and retries).
But given that this sort of invalid access should be rare, I can drop this for
now and revisit later if necessary.


-- 
Damien Le Moal
Western Digital Research