aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-core.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2013-10-28 15:33:58 -0400
committerJens Axboe <axboe@kernel.dk>2013-10-28 15:33:58 -0400
commit3228f48be2d19b2dd90db96ec16a40187a2946f3 (patch)
tree2f148dd8e82b287fc7b682cabc5614e3046d8949 /block/blk-core.c
parent280d45f6c35d8d7a0fe20c36caf426e3ac139cf9 (diff)
blk-mq: fix for flush deadlock
The flush state machine takes in a struct request, which then is submitted multiple times to the underling driver. The old block code requeses the same request for each of those, so it does not have an issue with tapping into the request pool. The new one on the other hand allocates a new request for each of the actualy steps of the flush sequence. If have already allocated all of the tags for IO, we will fail allocating the flush request. Set aside a reserved request just for flushes. Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-core.c')
-rw-r--r--block/blk-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index 3bb9e9f7f87e..9677c6525ed8 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -1102,7 +1102,7 @@ static struct request *blk_old_get_request(struct request_queue *q, int rw,
1102struct request *blk_get_request(struct request_queue *q, int rw, gfp_t gfp_mask) 1102struct request *blk_get_request(struct request_queue *q, int rw, gfp_t gfp_mask)
1103{ 1103{
1104 if (q->mq_ops) 1104 if (q->mq_ops)
1105 return blk_mq_alloc_request(q, rw, gfp_mask); 1105 return blk_mq_alloc_request(q, rw, gfp_mask, false);
1106 else 1106 else
1107 return blk_old_get_request(q, rw, gfp_mask); 1107 return blk_old_get_request(q, rw, gfp_mask);
1108} 1108}