bcachefs: Fix changing durability using sysfs

Signed-off-by: Torge Matthies <openglfreak@googlemail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Torge Matthies 2023-09-21 23:25:54 +02:00 committed by Kent Overstreet
parent 7239f8e0ee
commit d8b6f8c3c6

View File

@ -977,7 +977,7 @@ STORE(bch2_dev)
mutex_lock(&c->sb_lock);
mi = &bch2_sb_get_members(c->disk_sb.sb)->members[ca->dev_idx];
if (v != BCH_MEMBER_DURABILITY(mi)) {
if (v + 1 != BCH_MEMBER_DURABILITY(mi)) {
SET_BCH_MEMBER_DURABILITY(mi, v + 1);
bch2_write_super(c);
}