diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-07-16 02:54:51 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-09-09 16:41:47 +0300 |
commit | 9092a38a3dfd70326a47eb8d3ff57e995e770ed4 (patch) | |
tree | 4ff34dfc7b4532d7e160924413404654c649c366 /fs/bcachefs/sysfs.c | |
parent | 4aedeac5703e06f5e9c1eeee6f77136bcc15afdb (diff) | |
download | linux-9092a38a3dfd70326a47eb8d3ff57e995e770ed4.tar.xz |
bcachefs: Opt_durability can now be set via bch2_opt_set_sb()
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/sysfs.c')
-rw-r--r-- | fs/bcachefs/sysfs.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/fs/bcachefs/sysfs.c b/fs/bcachefs/sysfs.c index d97ac9444592..89da5323cf59 100644 --- a/fs/bcachefs/sysfs.c +++ b/fs/bcachefs/sysfs.c @@ -821,7 +821,6 @@ STORE(bch2_dev) { struct bch_dev *ca = container_of(kobj, struct bch_dev, kobj); struct bch_fs *c = ca->fs; - struct bch_member *mi; if (attr == &sysfs_discard) { bool v = strtoul_or_return(buf); @@ -832,14 +831,7 @@ STORE(bch2_dev) if (attr == &sysfs_durability) { u64 v = strtoul_or_return(buf); - mutex_lock(&c->sb_lock); - mi = bch2_members_v2_get_mut(c->disk_sb.sb, ca->dev_idx); - - if (v + 1 != BCH_MEMBER_DURABILITY(mi)) { - SET_BCH_MEMBER_DURABILITY(mi, v + 1); - bch2_write_super(c); - } - mutex_unlock(&c->sb_lock); + bch2_opt_set_sb(c, ca, bch2_opt_table + Opt_durability, v); } if (attr == &sysfs_label) { |