Commit 332c6e53 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Fix bch2_mark_extent()

If an extent only contained cached or erasure coded pointers, there
won't be any devices in the normal dirty replicas list or an entry to
update.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent bf974f92
......@@ -1063,7 +1063,8 @@ static int bch2_mark_extent(struct bch_fs *c, struct bkey_s_c k,
}
}
update_replicas(c, fs_usage, &r.e, dirty_sectors);
if (r.e.nr_devs)
update_replicas(c, fs_usage, &r.e, dirty_sectors);
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment