Thread (33 messages) 33 messages, 3 authors, 2023-08-16

Re: [PATCH v8 5/9] scsi: core: Retry unaligned zoned writes

From: Bart Van Assche <bvanassche@acm.org>
Date: 2023-08-15 17:30:17
Also in: linux-scsi

On 8/14/23 05:36, Damien Le Moal wrote:
On 8/12/23 06:35, Bart Van Assche wrote:
quoted
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -1238,6 +1238,8 @@ static blk_status_t sd_setup_read_write_cmnd(struct scsi_cmnd *cmd)
  	cmd->transfersize = sdp->sector_size;
  	cmd->underflow = nr_blocks << 9;
  	cmd->allowed = sdkp->max_retries;
+	if (!rq->q->limits.use_zone_write_lock && blk_rq_is_seq_zoned_write(rq))
This condition could be written as a little inline helper
blk_req_need_zone_write_lock(), which could be used in mq-dealine patch 2.
The above test differs from the tests in the mq-deadline I/O scheduler.
The mq-deadline I/O scheduler uses write locking if
rq->q->limits.use_zone_write_lock && q->disk->seq_zones_wlock &&
blk_rq_is_seq_zoned_write(rq). The above test is different and occurs
two times in scsi_error.c and one time in sd.c. Do you still want me to
introduce a helper function for that expression?

Thanks,

Bart.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help