summaryrefslogtreecommitdiff
path: root/drivers/md/bcache/alloc.c
diff options
context:
space:
mode:
authorSlava Pestov <sp@daterainc.com>2015-02-08 01:36:38 -0800
committerKent Overstreet <kmo@daterainc.com>2015-02-12 23:43:56 -0800
commit503c423ce553dafd471d4f6275b71a944c3e9609 (patch)
tree615fd5cb5d3eea13319d4b65216ef8ef577b3840 /drivers/md/bcache/alloc.c
parent6ba32f2e088b425f42b68c22ebe57f15c8996a48 (diff)
bcache: add more dynamic faults for init and device add paths
Also fix bugs in device add path exposed by these. Issue DAT-1050 Change-Id: Ic69128eaa920cedaf3301be6800acb7dbe5b0003
Diffstat (limited to 'drivers/md/bcache/alloc.c')
-rw-r--r--drivers/md/bcache/alloc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/md/bcache/alloc.c b/drivers/md/bcache/alloc.c
index 7ced8ebc2611..ece8f5a1aadd 100644
--- a/drivers/md/bcache/alloc.c
+++ b/drivers/md/bcache/alloc.c
@@ -1423,6 +1423,9 @@ const char *bch_cache_allocator_start(struct cache *ca)
}
spin_unlock(&ca->freelist_lock);
+ if (cache_set_init_fault("alloc_start"))
+ return "dynamic fault";
+
if (!fifo_full(&ca->free[RESERVE_PRIO]))
return "couldn't find enough available buckets to write prios";