Skip to content

Commit b774123

Browse files
Guoqing Jiangaxboe
authored andcommitted
blk-throttle: remove blk_throtl_drain
After the commit 5addeae ("blk-cgroup: remove blkcg_drain_queue"), there is no caller of blk_throtl_drain, so let's remove it. Signed-off-by: Guoqing Jiang <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 3221546 commit b774123

File tree

2 files changed

+0
-43
lines changed

2 files changed

+0
-43
lines changed

block/blk-throttle.c

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -2380,47 +2380,6 @@ static void tg_drain_bios(struct throtl_service_queue *parent_sq)
23802380
}
23812381
}
23822382

2383-
/**
2384-
* blk_throtl_drain - drain throttled bios
2385-
* @q: request_queue to drain throttled bios for
2386-
*
2387-
* Dispatch all currently throttled bios on @q through ->make_request_fn().
2388-
*/
2389-
void blk_throtl_drain(struct request_queue *q)
2390-
__releases(&q->queue_lock) __acquires(&q->queue_lock)
2391-
{
2392-
struct throtl_data *td = q->td;
2393-
struct blkcg_gq *blkg;
2394-
struct cgroup_subsys_state *pos_css;
2395-
struct bio *bio;
2396-
int rw;
2397-
2398-
rcu_read_lock();
2399-
2400-
/*
2401-
* Drain each tg while doing post-order walk on the blkg tree, so
2402-
* that all bios are propagated to td->service_queue. It'd be
2403-
* better to walk service_queue tree directly but blkg walk is
2404-
* easier.
2405-
*/
2406-
blkg_for_each_descendant_post(blkg, pos_css, td->queue->root_blkg)
2407-
tg_drain_bios(&blkg_to_tg(blkg)->service_queue);
2408-
2409-
/* finally, transfer bios from top-level tg's into the td */
2410-
tg_drain_bios(&td->service_queue);
2411-
2412-
rcu_read_unlock();
2413-
spin_unlock_irq(&q->queue_lock);
2414-
2415-
/* all bios now should be in td->service_queue, issue them */
2416-
for (rw = READ; rw <= WRITE; rw++)
2417-
while ((bio = throtl_pop_queued(&td->service_queue.queued[rw],
2418-
NULL)))
2419-
generic_make_request(bio);
2420-
2421-
spin_lock_irq(&q->queue_lock);
2422-
}
2423-
24242383
int blk_throtl_init(struct request_queue *q)
24252384
{
24262385
struct throtl_data *td;

block/blk.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,12 +296,10 @@ int create_task_io_context(struct task_struct *task, gfp_t gfp_mask, int node);
296296
* Internal throttling interface
297297
*/
298298
#ifdef CONFIG_BLK_DEV_THROTTLING
299-
extern void blk_throtl_drain(struct request_queue *q);
300299
extern int blk_throtl_init(struct request_queue *q);
301300
extern void blk_throtl_exit(struct request_queue *q);
302301
extern void blk_throtl_register_queue(struct request_queue *q);
303302
#else /* CONFIG_BLK_DEV_THROTTLING */
304-
static inline void blk_throtl_drain(struct request_queue *q) { }
305303
static inline int blk_throtl_init(struct request_queue *q) { return 0; }
306304
static inline void blk_throtl_exit(struct request_queue *q) { }
307305
static inline void blk_throtl_register_queue(struct request_queue *q) { }

0 commit comments

Comments
 (0)