On 7/17/23 23:38, Damien Le Moal wrote:
On 7/11/23 03:01, Bart Van Assche wrote:
diff --git a/block/mq-deadline.c b/block/mq-deadline.c
index 6aa5daf7ae32..0bed2bdeed89 100644
--- a/block/mq-deadline.c
+++ b/block/mq-deadline.c
@@ -353,7 +353,8 @@ deadline_fifo_request(struct deadline_data *dd, struct dd_per_prio *per_prio,
return NULL;
rq = rq_entry_fifo(per_prio->fifo_list[data_dir].next);
- if (data_dir == DD_READ || !blk_queue_is_zoned(rq->q))
+ if (data_dir == DD_READ || !blk_queue_is_zoned(rq->q) ||
+ blk_queue_pipeline_zoned_writes(rq->q))
What about using blk_req_needs_zone_write_lock() ?
Hmm ... how would using blk_req_needs_zone_write_lock() improve the
generated code? blk_queue_pipeline_zoned_writes() can be inlined and
only tests a single bit (a request queue flag) while
blk_req_needs_zone_write_lock() cannot be inlined by the compiler
because it has been defined in a .c file. Additionally,
blk_req_needs_zone_write_lock() has to dereference more pointers than
blk_queue_pipeline_zoned_writes(). From block/blk-zoned.c:
bool blk_req_needs_zone_write_lock(struct request *rq)
{
if (!rq->q->disk->seq_zones_wlock)
return false;
return blk_rq_is_seq_zoned_write(rq);
}
EXPORT_SYMBOL_GPL(blk_req_needs_zone_write_lock);
Thanks,
Bart.