Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 119670
b: refs/heads/master
c: 53a0880
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo authored and Jens Axboe committed Dec 3, 2008
1 parent 9a3b0a2 commit b53813d
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bf91db18ac2852a3ff39fe25ff56c5557c0fff78
refs/heads/master: 53a08807c01989c6847bb135d8d43f61c5dfdda5
4 changes: 2 additions & 2 deletions trunk/block/blk-barrier.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ static inline struct request *start_ordered(struct request_queue *q,
/*
* Prep proxy barrier request.
*/
blkdev_dequeue_request(rq);
elv_dequeue_request(q, rq);
q->orig_bar_rq = rq;
rq = &q->bar_rq;
blk_rq_init(q, rq);
Expand Down Expand Up @@ -219,7 +219,7 @@ int blk_do_ordered(struct request_queue *q, struct request **rqp)
* This can happen when the queue switches to
* ORDERED_NONE while this request is on it.
*/
blkdev_dequeue_request(rq);
elv_dequeue_request(q, rq);
if (__blk_end_request(rq, -EOPNOTSUPP,
blk_rq_bytes(rq)))
BUG();
Expand Down
24 changes: 23 additions & 1 deletion trunk/block/blk-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1636,6 +1636,28 @@ int blk_insert_cloned_request(struct request_queue *q, struct request *rq)
}
EXPORT_SYMBOL_GPL(blk_insert_cloned_request);

/**
* blkdev_dequeue_request - dequeue request and start timeout timer
* @req: request to dequeue
*
* Dequeue @req and start timeout timer on it. This hands off the
* request to the driver.
*
* Block internal functions which don't want to start timer should
* call elv_dequeue_request().
*/
void blkdev_dequeue_request(struct request *req)
{
elv_dequeue_request(req->q, req);

/*
* We are now handing the request to the hardware, add the
* timeout handler.
*/
blk_add_timer(req);
}
EXPORT_SYMBOL(blkdev_dequeue_request);

/**
* __end_that_request_first - end I/O on a request
* @req: the request being processed
Expand Down Expand Up @@ -1774,7 +1796,7 @@ static void end_that_request_last(struct request *req, int error)
blk_queue_end_tag(req->q, req);

if (blk_queued_rq(req))
blkdev_dequeue_request(req);
elv_dequeue_request(req->q, req);

if (unlikely(laptop_mode) && blk_fs_request(req))
laptop_io_completion();
Expand Down
7 changes: 0 additions & 7 deletions trunk/block/elevator.c
Original file line number Diff line number Diff line change
Expand Up @@ -844,14 +844,7 @@ void elv_dequeue_request(struct request_queue *q, struct request *rq)
*/
if (blk_account_rq(rq))
q->in_flight++;

/*
* We are now handing the request to the hardware, add the
* timeout handler.
*/
blk_add_timer(rq);
}
EXPORT_SYMBOL(elv_dequeue_request);

int elv_queue_empty(struct request_queue *q)
{
Expand Down
7 changes: 2 additions & 5 deletions trunk/include/linux/blkdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,8 @@ static inline void blk_run_address_space(struct address_space *mapping)
blk_run_backing_dev(mapping->backing_dev_info, NULL);
}

extern void blkdev_dequeue_request(struct request *req);

/*
* blk_end_request() and friends.
* __blk_end_request() and end_request() must be called with
Expand Down Expand Up @@ -820,11 +822,6 @@ extern void blk_update_request(struct request *rq, int error,
extern unsigned int blk_rq_bytes(struct request *rq);
extern unsigned int blk_rq_cur_bytes(struct request *rq);

static inline void blkdev_dequeue_request(struct request *req)
{
elv_dequeue_request(req->q, req);
}

/*
* Access functions for manipulating queue properties
*/
Expand Down

0 comments on commit b53813d

Please sign in to comment.