mirror of
https://github.com/torvalds/linux.git
synced 2024-11-26 14:12:06 +00:00
bcachefs: More debug params for testing of recovery paths
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
05235e9928
commit
6122ab639c
@ -278,7 +278,11 @@ do { \
|
||||
"cached data") \
|
||||
BCH_DEBUG_PARAM(force_reconstruct_read, \
|
||||
"Force reads to use the reconstruct path, when reading" \
|
||||
"from erasure coded extents")
|
||||
"from erasure coded extents") \
|
||||
BCH_DEBUG_PARAM(test_restart_gc, \
|
||||
"Test restarting mark and sweep gc when bucket gens change")\
|
||||
BCH_DEBUG_PARAM(test_reconstruct_alloc, \
|
||||
"Test reconstructing the alloc btree")
|
||||
|
||||
#define BCH_DEBUG_PARAMS_ALL() BCH_DEBUG_PARAMS_ALWAYS() BCH_DEBUG_PARAMS_DEBUG()
|
||||
|
||||
|
@ -750,7 +750,9 @@ again:
|
||||
|
||||
c->gc_count++;
|
||||
out:
|
||||
if (!ret && test_bit(BCH_FS_FIXED_GENS, &c->flags)) {
|
||||
if (!ret &&
|
||||
(test_bit(BCH_FS_FIXED_GENS, &c->flags) ||
|
||||
(!iter && test_restart_gc(c)))) {
|
||||
/*
|
||||
* XXX: make sure gens we fixed got saved
|
||||
*/
|
||||
|
@ -277,6 +277,10 @@ int bch2_fs_recovery(struct bch_fs *c)
|
||||
if (r->error)
|
||||
goto err;
|
||||
|
||||
if (i == BTREE_ID_ALLOC &&
|
||||
test_reconstruct_alloc(c))
|
||||
continue;
|
||||
|
||||
err = "error reading btree root";
|
||||
ret = bch2_btree_root_read(c, i, &r->key, r->level);
|
||||
if (ret) {
|
||||
|
Loading…
Reference in New Issue
Block a user