diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2019-08-22 20:20:38 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:08:26 +0300 |
commit | df5d4dae0b667f93616d6e47da09ad916dcb7102 (patch) | |
tree | abf45721054c25b75aab9bae48c409299ad36315 /fs/bcachefs/replicas.c | |
parent | 6671a7089fdcdd8f25f6b4729fdc066f7c42edfd (diff) | |
download | linux-df5d4dae0b667f93616d6e47da09ad916dcb7102.tar.xz |
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; } |