Commit fd6baa91 authored by Thorsten Knabe's avatar Thorsten Knabe Committed by Luis Henriques

um: ubd: Fix for processes stuck in D state forever

commit 2a236122 upstream.

Starting with Linux 3.12 processes get stuck in D state forever in
UserModeLinux under sync heavy workloads. This bug was introduced by
commit 805f11a0 (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: 805f11a0 (um: ubd: Add REQ_FLUSH suppport)
Signed-off-by: default avatarThorsten Knabe <linux@thorsten-knabe.de>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent 49bef5ac
...@@ -1277,7 +1277,7 @@ static void do_ubd_request(struct request_queue *q) ...@@ -1277,7 +1277,7 @@ static void do_ubd_request(struct request_queue *q)
while(1){ while(1){
struct ubd *dev = q->queuedata; struct ubd *dev = q->queuedata;
if(dev->end_sg == 0){ if(dev->request == NULL){
struct request *req = blk_fetch_request(q); struct request *req = blk_fetch_request(q);
if(req == NULL) if(req == NULL)
return; return;
...@@ -1299,7 +1299,8 @@ static void do_ubd_request(struct request_queue *q) ...@@ -1299,7 +1299,8 @@ static void do_ubd_request(struct request_queue *q)
return; return;
} }
prepare_flush_request(req, io_req); prepare_flush_request(req, io_req);
submit_request(io_req, dev); if (submit_request(io_req, dev) == false)
return;
} }
while(dev->start_sg < dev->end_sg){ while(dev->start_sg < dev->end_sg){
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment