diff options
author | James Bottomley <jejb@titanic.(none)> | 2005-06-17 18:42:23 -0500 |
---|---|---|
committer | James Bottomley <jejb@titanic.(none)> | 2005-06-17 18:42:23 -0500 |
commit | 3237ee78fc00f786d5f5aec6f9310b0e39069f15 (patch) | |
tree | 4c94e70ab846ffcb8bb5715fb3c8d8473358a323 /drivers/block/elevator.c | |
parent | 9ee1c939d1cb936b1f98e8d81aeffab57bae46ab (diff) | |
parent | df0ae2497ddefd72a87f3a3b34ff32455d7d4ae0 (diff) | |
download | blackbird-obmc-linux-3237ee78fc00f786d5f5aec6f9310b0e39069f15.tar.gz blackbird-obmc-linux-3237ee78fc00f786d5f5aec6f9310b0e39069f15.zip |
merge by hand (fix up qla_os.c merge error)
Diffstat (limited to 'drivers/block/elevator.c')
-rw-r--r-- | drivers/block/elevator.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/block/elevator.c b/drivers/block/elevator.c index 89982925f9e2..f831f08f839c 100644 --- a/drivers/block/elevator.c +++ b/drivers/block/elevator.c @@ -286,6 +286,13 @@ void elv_requeue_request(request_queue_t *q, struct request *rq) } /* + * 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 */ @@ -381,6 +388,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) { |