diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2019-08-22 13:20:38 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:08:26 -0400 |
commit | df5d4dae0b667f93616d6e47da09ad916dcb7102 (patch) | |
tree | abf45721054c25b75aab9bae48c409299ad36315 /fs/bcachefs/replicas.c | |
parent | 6671a7089fdcdd8f25f6b4729fdc066f7c42edfd (diff) | |
download | linux-df5d4dae0b667f93616d6e47da09ad916dcb7102.tar.gz linux-df5d4dae0b667f93616d6e47da09ad916dcb7102.tar.bz2 linux-df5d4dae0b667f93616d6e47da09ad916dcb7102.zip |
bcachefs: Fixes for replicas tracking
The continue statement in bch2_trans_mark_extent() was wrong - by
bailing out early, we'd be constructing the wrong replicas list to
update. Also, the assertion in update_replicas() was wrong - due to
rounding with compressed extents, it is possible for sectors to be 0
sometimes.
Also, change extent_to_replicas() in replicas.c to match the replicas
list we construct in buckets.c.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/replicas.c')
-rw-r--r-- | fs/bcachefs/replicas.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/replicas.c b/fs/bcachefs/replicas.c index 4fb142f3d39c..64024ce01665 100644 --- a/fs/bcachefs/replicas.c +++ b/fs/bcachefs/replicas.c @@ -80,7 +80,7 @@ static void extent_to_replicas(struct bkey_s_c k, continue; if (p.ec_nr) { - r->nr_devs = 0; + r->nr_required = 0; break; } |