File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -1514,14 +1514,26 @@ void blk_mq_delay_kick_requeue_list(struct request_queue *q,
1514
1514
}
1515
1515
EXPORT_SYMBOL (blk_mq_delay_kick_requeue_list );
1516
1516
1517
+ static bool blk_is_flush_data_rq (struct request * rq )
1518
+ {
1519
+ return (rq -> rq_flags & RQF_FLUSH_SEQ ) && !is_flush_rq (rq );
1520
+ }
1521
+
1517
1522
static bool blk_mq_rq_inflight (struct request * rq , void * priv )
1518
1523
{
1519
1524
/*
1520
1525
* If we find a request that isn't idle we know the queue is busy
1521
1526
* as it's checked in the iter.
1522
1527
* Return false to stop the iteration.
1528
+ *
1529
+ * In case of queue quiesce, if one flush data request is completed,
1530
+ * don't count it as inflight given the flush sequence is suspended,
1531
+ * and the original flush data request is invisible to driver, just
1532
+ * like other pending requests because of quiesce
1523
1533
*/
1524
- if (blk_mq_request_started (rq )) {
1534
+ if (blk_mq_request_started (rq ) && !(blk_queue_quiesced (rq -> q ) &&
1535
+ blk_is_flush_data_rq (rq ) &&
1536
+ blk_mq_request_completed (rq ))) {
1525
1537
bool * busy = priv ;
1526
1538
1527
1539
* busy = true;
You can’t perform that action at this time.
0 commit comments