diff options
author | Thorsten Knabe <linux@thorsten-knabe.de> | 2014-08-23 09:47:38 -0400 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2014-10-13 15:45:55 -0400 |
commit | 2a2361228c5e6d8c1733f00653481de918598e50 (patch) | |
tree | d3cdbfaa7aecbe941417bc63435b1f315aabf762 | |
parent | 9e6a57d2cdee36a6d9c5d5cc3db85713dd416719 (diff) |
um: ubd: Fix for processes stuck in D state forever
Starting with Linux 3.12 processes get stuck in D state forever in
UserModeLinux under sync heavy workloads. This bug was introduced by
commit 805f11a0d5 (um: ubd: Add REQ_FLUSH suppport).
Fix bug by adding a check if FLUSH request was successfully submitted to
the I/O thread and keeping the FLUSH request on the request queue on
submission failures.
Fixes: 805f11a0d5 (um: ubd: Add REQ_FLUSH suppport)
Signed-off-by: Thorsten Knabe <linux@thorsten-knabe.de>
Cc: stable@kernel.org # >= 3.12
Signed-off-by: Richard Weinberger <richard@nod.at>
-rw-r--r-- | arch/um/drivers/ubd_kern.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c index 3716e6952554..e8ab93c3e638 100644 --- a/arch/um/drivers/ubd_kern.c +++ b/arch/um/drivers/ubd_kern.c | |||
@@ -1277,7 +1277,7 @@ static void do_ubd_request(struct request_queue *q) | |||
1277 | 1277 | ||
1278 | while(1){ | 1278 | while(1){ |
1279 | struct ubd *dev = q->queuedata; | 1279 | struct ubd *dev = q->queuedata; |
1280 | if(dev->end_sg == 0){ | 1280 | if(dev->request == NULL){ |
1281 | struct request *req = blk_fetch_request(q); | 1281 | struct request *req = blk_fetch_request(q); |
1282 | if(req == NULL) | 1282 | if(req == NULL) |
1283 | return; | 1283 | return; |
@@ -1299,7 +1299,8 @@ static void do_ubd_request(struct request_queue *q) | |||
1299 | return; | 1299 | return; |
1300 | } | 1300 | } |
1301 | prepare_flush_request(req, io_req); | 1301 | prepare_flush_request(req, io_req); |
1302 | submit_request(io_req, dev); | 1302 | if (submit_request(io_req, dev) == false) |
1303 | return; | ||
1303 | } | 1304 | } |
1304 | 1305 | ||
1305 | while(dev->start_sg < dev->end_sg){ | 1306 | while(dev->start_sg < dev->end_sg){ |