linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] blk-mq: fix FUA request hang
@ 2015-05-01 16:59 Shaohua Li
  2015-05-04 19:10 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Shaohua Li @ 2015-05-01 16:59 UTC (permalink / raw)
  To: linux-kernel; +Cc: axboe, Kernel-team

When a FUA request enters its DATA stage of flush pipeline, the
request is added to mq requeue list, the request will then be added to
ctx->rq_list. blk_mq_attempt_merge() might merge the request with a bio.
Later when the request is finished the flush pipeline, the
request->__data_len is 0. Then I only saw the bio gets endio called, the
original request never finish.

Adding REQ_FLUSH_SEQ into REQ_NOMERGE_FLAGS looks an easy fix.

stable: 3.15+

Signed-off-by: Shaohua Li <shli@fb.com>
---
 include/linux/blk_types.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h
index a1b25e3..b7299fe 100644
--- a/include/linux/blk_types.h
+++ b/include/linux/blk_types.h
@@ -220,7 +220,7 @@ enum rq_flag_bits {
 
 /* This mask is used for both bio and request merge checking */
 #define REQ_NOMERGE_FLAGS \
-	(REQ_NOMERGE | REQ_STARTED | REQ_SOFTBARRIER | REQ_FLUSH | REQ_FUA)
+	(REQ_NOMERGE | REQ_STARTED | REQ_SOFTBARRIER | REQ_FLUSH | REQ_FUA | REQ_FLUSH_SEQ)
 
 #define REQ_RAHEAD		(1ULL << __REQ_RAHEAD)
 #define REQ_THROTTLED		(1ULL << __REQ_THROTTLED)
-- 
1.8.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] blk-mq: fix FUA request hang
  2015-05-01 16:59 [PATCH] blk-mq: fix FUA request hang Shaohua Li
@ 2015-05-04 19:10 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2015-05-04 19:10 UTC (permalink / raw)
  To: Shaohua Li, linux-kernel; +Cc: Kernel-team

On 05/01/2015 10:59 AM, Shaohua Li wrote:
> When a FUA request enters its DATA stage of flush pipeline, the
> request is added to mq requeue list, the request will then be added to
> ctx->rq_list. blk_mq_attempt_merge() might merge the request with a bio.
> Later when the request is finished the flush pipeline, the
> request->__data_len is 0. Then I only saw the bio gets endio called, the
> original request never finish.
>
> Adding REQ_FLUSH_SEQ into REQ_NOMERGE_FLAGS looks an easy fix.

Thanks, applied.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-05-04 19:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-01 16:59 [PATCH] blk-mq: fix FUA request hang Shaohua Li
2015-05-04 19:10 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).