Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 242246
b: refs/heads/master
c: da52777
h: refs/heads/master
v: v3
  • Loading branch information
Vivek Goyal authored and Jens Axboe committed Mar 3, 2011
1 parent 53a2ed7 commit 30bf95c
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 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: cd25f54961273c2e4cbd47441e04832468382a5e
refs/heads/master: da527770007fce8e4541947d47918248286da875
7 changes: 6 additions & 1 deletion trunk/block/blk-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -380,13 +380,16 @@ EXPORT_SYMBOL(blk_stop_queue);
* that its ->make_request_fn will not re-add plugging prior to calling
* this function.
*
* This function does not cancel any asynchronous activity arising
* out of elevator or throttling code. That would require elevaotor_exit()
* and blk_throtl_exit() to be called with queue lock initialized.
*
*/
void blk_sync_queue(struct request_queue *q)
{
del_timer_sync(&q->unplug_timer);
del_timer_sync(&q->timeout);
cancel_work_sync(&q->unplug_work);
throtl_shutdown_timer_wq(q);
}
EXPORT_SYMBOL(blk_sync_queue);

Expand Down Expand Up @@ -469,6 +472,8 @@ void blk_cleanup_queue(struct request_queue *q)
if (q->elevator)
elevator_exit(q->elevator);

blk_throtl_exit(q);

blk_put_queue(q);
}
EXPORT_SYMBOL(blk_cleanup_queue);
Expand Down
2 changes: 0 additions & 2 deletions trunk/block/blk-sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -471,8 +471,6 @@ static void blk_release_queue(struct kobject *kobj)

blk_sync_queue(q);

blk_throtl_exit(q);

if (rl->rq_pool)
mempool_destroy(rl->rq_pool);

Expand Down
6 changes: 3 additions & 3 deletions trunk/block/blk-throttle.c
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,7 @@ static void throtl_update_blkio_group_write_iops(void *key,
throtl_schedule_delayed_work(td->queue, 0);
}

void throtl_shutdown_timer_wq(struct request_queue *q)
static void throtl_shutdown_wq(struct request_queue *q)
{
struct throtl_data *td = q->td;

Expand Down Expand Up @@ -1099,7 +1099,7 @@ void blk_throtl_exit(struct request_queue *q)

BUG_ON(!td);

throtl_shutdown_timer_wq(q);
throtl_shutdown_wq(q);

spin_lock_irq(q->queue_lock);
throtl_release_tgs(td);
Expand Down Expand Up @@ -1129,7 +1129,7 @@ void blk_throtl_exit(struct request_queue *q)
* update limits through cgroup and another work got queued, cancel
* it.
*/
throtl_shutdown_timer_wq(q);
throtl_shutdown_wq(q);
throtl_td_free(td);
}

Expand Down
2 changes: 0 additions & 2 deletions trunk/include/linux/blkdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -1144,7 +1144,6 @@ extern int blk_throtl_init(struct request_queue *q);
extern void blk_throtl_exit(struct request_queue *q);
extern int blk_throtl_bio(struct request_queue *q, struct bio **bio);
extern void throtl_schedule_delayed_work(struct request_queue *q, unsigned long delay);
extern void throtl_shutdown_timer_wq(struct request_queue *q);
#else /* CONFIG_BLK_DEV_THROTTLING */
static inline int blk_throtl_bio(struct request_queue *q, struct bio **bio)
{
Expand All @@ -1154,7 +1153,6 @@ static inline int blk_throtl_bio(struct request_queue *q, struct bio **bio)
static inline int blk_throtl_init(struct request_queue *q) { return 0; }
static inline int blk_throtl_exit(struct request_queue *q) { return 0; }
static inline void throtl_schedule_delayed_work(struct request_queue *q, unsigned long delay) {}
static inline void throtl_shutdown_timer_wq(struct request_queue *q) {}
#endif /* CONFIG_BLK_DEV_THROTTLING */

#define MODULE_ALIAS_BLOCKDEV(major,minor) \
Expand Down

0 comments on commit 30bf95c

Please sign in to comment.