Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion block/bfq-cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -936,14 +936,23 @@ static void bfq_pd_offline(struct blkg_policy_data *pd)

void bfq_end_wr_async(struct bfq_data *bfqd)
{
struct request_queue *q = bfqd->queue;
struct blkcg_gq *blkg;

list_for_each_entry(blkg, &bfqd->queue->blkg_list, q_node) {
mutex_lock(&q->blkcg_mutex);
spin_lock_irq(&q->queue_lock);
spin_lock(&bfqd->lock);

list_for_each_entry(blkg, &q->blkg_list, q_node) {
struct bfq_group *bfqg = blkg_to_bfqg(blkg);

bfq_end_wr_async_queues(bfqd, bfqg);
}
bfq_end_wr_async_queues(bfqd, bfqd->root_group);

spin_unlock(&bfqd->lock);
spin_unlock_irq(&q->queue_lock);
mutex_unlock(&q->blkcg_mutex);
}

static int bfq_io_show_weight_legacy(struct seq_file *sf, void *v)
Expand Down Expand Up @@ -1416,7 +1425,9 @@ void bfq_bic_update_cgroup(struct bfq_io_cq *bic, struct bio *bio) {}

void bfq_end_wr_async(struct bfq_data *bfqd)
{
spin_lock_irq(&bfqd->lock);
bfq_end_wr_async_queues(bfqd, bfqd->root_group);
spin_unlock_irq(&bfqd->lock);
}

struct bfq_group *bfq_bio_bfqg(struct bfq_data *bfqd, struct bio *bio)
Expand Down
3 changes: 2 additions & 1 deletion block/bfq-iosched.c
Original file line number Diff line number Diff line change
Expand Up @@ -2653,9 +2653,10 @@ static void bfq_end_wr(struct bfq_data *bfqd)
}
list_for_each_entry(bfqq, &bfqd->idle_list, bfqq_list)
bfq_bfqq_end_wr(bfqq);
bfq_end_wr_async(bfqd);

spin_unlock_irq(&bfqd->lock);

bfq_end_wr_async(bfqd);
}

static sector_t bfq_io_struct_pos(void *io_struct, bool request)
Expand Down
Loading