diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-05-12 18:00:32 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-05-12 20:29:32 -0400 |
commit | 7142075fdac05c8ed3adc51cf39d985171ca9105 (patch) | |
tree | 4f9311464f6d7247577214d45eafadfbfa160e0a /libbcachefs/replicas.c | |
parent | 6e897639569207885257ac744019b7e5c340fb74 (diff) |
Update bcachefs sources to ed4d21711d bcachefs: Replace a BUG_ON() with fatal errorsnapshot_tree_fix
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'libbcachefs/replicas.c')
-rw-r--r-- | libbcachefs/replicas.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/libbcachefs/replicas.c b/libbcachefs/replicas.c index 8ae50dfd..76efbfce 100644 --- a/libbcachefs/replicas.c +++ b/libbcachefs/replicas.c @@ -460,36 +460,11 @@ int bch2_replicas_delta_list_mark(struct bch_fs *c, int bch2_replicas_gc_end(struct bch_fs *c, int ret) { - unsigned i; - lockdep_assert_held(&c->replicas_gc_lock); mutex_lock(&c->sb_lock); percpu_down_write(&c->mark_lock); - /* - * this is kind of crappy; the replicas gc mechanism needs to be ripped - * out - */ - - for (i = 0; i < c->replicas.nr; i++) { - struct bch_replicas_entry *e = - cpu_replicas_entry(&c->replicas, i); - struct bch_replicas_cpu n; - - if (!__replicas_has_entry(&c->replicas_gc, e) && - bch2_fs_usage_read_one(c, &c->usage_base->replicas[i])) { - n = cpu_replicas_add_entry(&c->replicas_gc, e); - if (!n.entries) { - ret = -BCH_ERR_ENOMEM_cpu_replicas; - goto err; - } - - swap(n, c->replicas_gc); - kfree(n.entries); - } - } - ret = bch2_cpu_replicas_to_sb_replicas(c, &c->replicas_gc); if (ret) goto err; |