diff options
author | Kent Overstreet <koverstreet@google.com> | 2013-04-30 22:14:40 -0400 |
---|---|---|
committer | Kent Overstreet <koverstreet@google.com> | 2013-04-30 22:14:40 -0400 |
commit | 86b26b824cf5d15d4408b33d6d716104f249e8bd (patch) | |
tree | d36395292ec70eac25ba86321a8a9361b78070a2 /drivers/md/bcache/btree.c | |
parent | 8abb2a5dbadab91f9cae22270054e9ee3b3a1d2f (diff) |
bcache: Allocator cleanup/fixes
The main fix is that bch_allocator_thread() wasn't waiting on
garbage collection to finish (if invalidate_buckets had set
ca->invalidate_needs_gc); we need that to make sure the allocator
doesn't spin and potentially block gc from finishing.
Signed-off-by: Kent Overstreet <koverstreet@google.com>
Diffstat (limited to 'drivers/md/bcache/btree.c')
-rw-r--r-- | drivers/md/bcache/btree.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/md/bcache/btree.c b/drivers/md/bcache/btree.c index 852340793777..7a5658f04e62 100644 --- a/drivers/md/bcache/btree.c +++ b/drivers/md/bcache/btree.c | |||
@@ -984,7 +984,7 @@ static void btree_node_free(struct btree *b, struct btree_op *op) | |||
984 | 984 | ||
985 | if (b->prio_blocked && | 985 | if (b->prio_blocked && |
986 | !atomic_sub_return(b->prio_blocked, &b->c->prio_blocked)) | 986 | !atomic_sub_return(b->prio_blocked, &b->c->prio_blocked)) |
987 | closure_wake_up(&b->c->bucket_wait); | 987 | wake_up(&b->c->alloc_wait); |
988 | 988 | ||
989 | b->prio_blocked = 0; | 989 | b->prio_blocked = 0; |
990 | 990 | ||
@@ -1548,7 +1548,6 @@ static void bch_btree_gc(struct closure *cl) | |||
1548 | 1548 | ||
1549 | trace_bcache_gc_end(c->sb.set_uuid); | 1549 | trace_bcache_gc_end(c->sb.set_uuid); |
1550 | wake_up(&c->alloc_wait); | 1550 | wake_up(&c->alloc_wait); |
1551 | closure_wake_up(&c->bucket_wait); | ||
1552 | 1551 | ||
1553 | continue_at(cl, bch_moving_gc, bch_gc_wq); | 1552 | continue_at(cl, bch_moving_gc, bch_gc_wq); |
1554 | } | 1553 | } |