Thread (2 messages) 2 messages, 2 authors, 2022-08-29

Re: [PATCH v2] block: I/O error occurs during SATA disk stress test

From: Bart Van Assche <bvanassche@acm.org>
Date: 2022-08-29 03:30:53

On 8/28/22 20:25, gumi@linux.alibaba.com wrote:
This problem occurs on kernel version 5.10, and i read this commit
you mentioned. The problem I observed is not a problem of req re-used
fixed by commit 2e315dc07df0, but a different problem. The specific
scene is this: A new IO has called blk_mq_start_request() to start
sending, and an instruction out of sequence occurs between
blk_add_timer() and WRITE_ONCE(rq->state,MQ_RQ_IN_FLIGHT) in
blk_mq_start_request(), so the req->state is set to MQ_RQ_IN_FLIGHT,
but req->deadline still 0, and at this very moment, timeout
handler(blk_mq_check_expired()) check if this new IO times out,  this
condition(if (time_after_eq(jiffies, deadline)) in
blk_mq_req_expired() called by blk_mq_check_expired()) will is true.
The end result is that this new IO is considered to have timed out. I
looked at the latest kernel code and the problem persists, do you
agree with my analysis process?
It seems unlikely to me that the above analysis is correct. If this 
problem would occur with recent kernel versions, I think that it would 
already have been reported by other Linux users.

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