bcache: wait for buckets when allocating new btree root

Tested:
- sometimes bcache_tier test would hang on startup with a failure
  to allocate the btree root -- no longer seeing this

Signed-off-by: Kent Overstreet <kmo@daterainc.com>
This commit is contained in:
Slava Pestov
2014-04-21 18:23:12 -07:00
committed by Kent Overstreet
parent a664d0f05a
commit c5aa4a3157
3 changed files with 12 additions and 5 deletions

View File

@@ -1669,7 +1669,7 @@ static void run_cache_set(struct cache_set *c)
goto err;
err = "cannot allocate new btree root";
c->root = bch_btree_node_alloc(c, NULL, 0);
c->root = __bch_btree_node_alloc(c, NULL, 0, true);
if (IS_ERR_OR_NULL(c->root))
goto err;