diff options
Diffstat (limited to 'libbcache/extents.c')
-rw-r--r-- | libbcache/extents.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libbcache/extents.c b/libbcache/extents.c index c5e0e375..af3d031a 100644 --- a/libbcache/extents.c +++ b/libbcache/extents.c @@ -622,6 +622,9 @@ bch_btree_pick_ptr(struct cache_set *c, const struct btree *b) PTR_BUCKET_NR(ca, ptr))) continue; + if (ca->mi.state == BCH_MEMBER_STATE_FAILED) + continue; + if (pick.ca && pick.ca->mi.tier < ca->mi.tier) continue; @@ -938,7 +941,7 @@ struct extent_insert_state { struct btree_insert *trans; struct btree_insert_entry *insert; struct bpos committed; - struct bucket_stats_cache_set stats; + struct bch_fs_usage stats; /* for deleting: */ struct bkey_i whiteout; @@ -2202,6 +2205,9 @@ void bch_extent_pick_ptr_avoiding(struct cache_set *c, struct bkey_s_c k, if (ptr_stale(ca, ptr)) continue; + if (ca->mi.state == BCH_MEMBER_STATE_FAILED) + continue; + if (ret->ca && (ca == avoid || ret->ca->mi.tier < ca->mi.tier)) |