Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 2029
b: refs/heads/master
c: 2e759cd
h: refs/heads/master
i:
  2027: d055579
v: v3
  • Loading branch information
Tejun Heo authored and James Bottomley committed May 20, 2005
1 parent 9aaf1e6 commit 4d0536c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 354d6b2196c8e53e55e8f169804256ab9c72731d
refs/heads/master: 2e759cd4fa60c6df4cb117848274f444c2c0a12d
13 changes: 13 additions & 0 deletions trunk/drivers/block/elevator.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,13 @@ void elv_requeue_request(request_queue_t *q, struct request *rq)
rq = rq->end_io_data;
}

/*
* the request is prepped and may have some resources allocated.
* allowing unprepped requests to pass this one may cause resource
* deadlock. turn on softbarrier.
*/
rq->flags |= REQ_SOFTBARRIER;

/*
* if iosched has an explicit requeue hook, then use that. otherwise
* just put the request at the front of the queue
Expand Down Expand Up @@ -386,6 +393,12 @@ struct request *elv_next_request(request_queue_t *q)
if (ret == BLKPREP_OK) {
break;
} else if (ret == BLKPREP_DEFER) {
/*
* the request may have been (partially) prepped.
* we need to keep this request in the front to
* avoid resource deadlock. turn on softbarrier.
*/
rq->flags |= REQ_SOFTBARRIER;
rq = NULL;
break;
} else if (ret == BLKPREP_KILL) {
Expand Down

0 comments on commit 4d0536c

Please sign in to comment.