Skip to content

Commit b2387dd

Browse files
shligitaxboe
authored andcommitted
blk-mq: fix FUA request hang
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> Signed-off-by: Jens Axboe <axboe@fb.com>
1 parent 6cd18e7 commit b2387dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/blk_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ enum rq_flag_bits {
220220

221221
/* This mask is used for both bio and request merge checking */
222222
#define REQ_NOMERGE_FLAGS \
223-
(REQ_NOMERGE | REQ_STARTED | REQ_SOFTBARRIER | REQ_FLUSH | REQ_FUA)
223+
(REQ_NOMERGE | REQ_STARTED | REQ_SOFTBARRIER | REQ_FLUSH | REQ_FUA | REQ_FLUSH_SEQ)
224224

225225
#define REQ_RAHEAD (1ULL << __REQ_RAHEAD)
226226
#define REQ_THROTTLED (1ULL << __REQ_THROTTLED)

0 commit comments

Comments
 (0)