Re: [PATCH v2 11/12] block: mq-deadline: Fix a race condition related to zoned writes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/10/23 01:16, Damien Le Moal wrote:
On 4/8/23 08:58, Bart Van Assche wrote:
+		WARN_ON_ONCE(!blk_queue_is_zoned(q));

I do not think this WARN is useful as blk_req_can_dispatch_to_zone() will always
return true for regular block devices.

Hi Damien,

I will leave it out.

Are you OK with adding a blk_rq_zone_no() definition if CONFIG_BLK_DEV_ZONED is not defined (as has been done in this patch) or do you perhaps prefer that I surround the code blocks that have been added by this patch and in which blk_rq_zone_no() is called by #ifdef CONFIG_BLK_DEV_ZONED / #endif?

+
+		if (!blk_queue_nonrot(q)) {
  			rq = deadline_skip_seq_writes(dd, rq);
+			if (!rq)
+				break;
+			rq = deadline_earlier_request(rq);
+			if (WARN_ON_ONCE(!rq))
+				break;

I do not understand why this is needed.

Are you perhaps referring to the deadline_earlier_request() call? The while loop below advances 'rq' at least to the next request. The deadline_earlier_request() call compensates for this by going back to the previous request.

Thanks,

Bart.



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux