From beb946a5d23b87ffd1ac627ff98650b2516bfe27 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Fri, 21 Nov 2025 10:30:16 -0500 Subject: [PATCH] Update bcachefs sources to 2f55ab5899a1 bcachefs: opts.writeback_timeout --- .bcachefs_revision | 2 +- libbcachefs/bcachefs.h | 1 - libbcachefs/debug/sysfs.c | 9 +++------ libbcachefs/opts.c | 4 ---- libbcachefs/opts.h | 19 +++++++------------ libbcachefs/vfs/fs.c | 10 ---------- 6 files changed, 11 insertions(+), 34 deletions(-) diff --git a/.bcachefs_revision b/.bcachefs_revision index 883bd647..6e4c3e6e 100644 --- a/.bcachefs_revision +++ b/.bcachefs_revision @@ -1 +1 @@ -512f2a45a090f75801b5c9b26fe44e4337282b47 +2f55ab5899a1e409e30d24303d77a67ba0a2efd0 diff --git a/libbcachefs/bcachefs.h b/libbcachefs/bcachefs.h index 2e15a6da..9667ca88 100644 --- a/libbcachefs/bcachefs.h +++ b/libbcachefs/bcachefs.h @@ -821,7 +821,6 @@ struct bch_fs { struct bch_opts opts; atomic_t opt_change_cookie; - struct bch_opts_mask mount_opts; unsigned loglevel; unsigned prev_loglevel; diff --git a/libbcachefs/debug/sysfs.c b/libbcachefs/debug/sysfs.c index 2c8cb647..d79d8d05 100644 --- a/libbcachefs/debug/sysfs.c +++ b/libbcachefs/debug/sysfs.c @@ -706,14 +706,11 @@ static ssize_t sysfs_opt_store(struct bch_fs *c, BUG(); } - if (changed) { - if (!ca) { - bch2_opt_set_by_id(&c->opts, id, v); - clear_bit(id, c->mount_opts.d); - } + if (!ca) + bch2_opt_set_by_id(&c->opts, id, v); + if (changed) bch2_opt_hook_post_set(c, ca, 0, id, v); - } ret = size; err: diff --git a/libbcachefs/opts.c b/libbcachefs/opts.c index 2ed1361d..9c15fad7 100644 --- a/libbcachefs/opts.c +++ b/libbcachefs/opts.c @@ -508,7 +508,6 @@ void bch2_opt_to_text(struct printbuf *out, void bch2_opts_to_text(struct printbuf *out, struct bch_opts opts, struct bch_fs *c, struct bch_sb *sb, - struct bch_opts_mask *mask, unsigned show_mask, unsigned hide_mask, unsigned flags) { @@ -520,9 +519,6 @@ void bch2_opts_to_text(struct printbuf *out, if ((opt->flags & hide_mask) || !(opt->flags & show_mask)) continue; - if (mask && !test_bit(i, mask->d)) - continue; - u64 v = bch2_opt_get_by_id(&opts, i); if (v == bch2_opt_get_by_id(&bch2_opts_default, i)) continue; diff --git a/libbcachefs/opts.h b/libbcachefs/opts.h index b5a97664..637cbf7d 100644 --- a/libbcachefs/opts.h +++ b/libbcachefs/opts.h @@ -563,17 +563,6 @@ enum fsck_err_opts { NULL, "BTREE_ITER_prefetch causes btree nodes to be\n"\ " prefetched sequentially") -enum bch_opt_id { -#define x(_name, ...) Opt_##_name, - BCH_OPTS() -#undef x - bch2_opts_nr -}; - -struct bch_opts_mask { - unsigned long d[BITS_TO_LONGS(bch2_opts_nr)]; -}; - struct bch_opts { #define x(_name, _bits, ...) unsigned _name##_defined:1; BCH_OPTS() @@ -618,6 +607,13 @@ static inline struct bch_opts bch2_opts_empty(void) void bch2_opts_apply(struct bch_opts *, struct bch_opts); +enum bch_opt_id { +#define x(_name, ...) Opt_##_name, + BCH_OPTS() +#undef x + bch2_opts_nr +}; + struct bch_fs; struct printbuf; @@ -668,7 +664,6 @@ void bch2_opt_to_text(struct printbuf *, struct bch_fs *, struct bch_sb *, void bch2_opts_to_text(struct printbuf *, struct bch_opts, struct bch_fs *, struct bch_sb *, - struct bch_opts_mask *, unsigned, unsigned, unsigned); int bch2_opt_hook_pre_set(struct bch_fs *, struct bch_dev *, u64, enum bch_opt_id, u64, bool); diff --git a/libbcachefs/vfs/fs.c b/libbcachefs/vfs/fs.c index 7cce3f37..a4f0f311 100644 --- a/libbcachefs/vfs/fs.c +++ b/libbcachefs/vfs/fs.c @@ -2015,7 +2015,6 @@ static int bch2_show_options(struct seq_file *seq, struct dentry *root) CLASS(printbuf, buf)(); bch2_opts_to_text(&buf, c->opts, c, c->disk_sb.sb, - &c->mount_opts, OPT_MOUNT, OPT_HIDDEN, OPT_SHOW_MOUNT_STYLE); printbuf_nul_terminate(&buf); seq_printf(seq, ",%s", buf.buf); @@ -2099,13 +2098,6 @@ static int bch2_test_super(struct super_block *s, void *data) return true; } -static void set_mount_opts(struct bch_fs *c, struct bch_opts *opts) -{ - for (enum bch_opt_id id = 0; id < bch2_opts_nr; id++) - if (bch2_opt_defined_by_id(opts, id)) - set_bit(id, c->mount_opts.d); -} - static int bch2_fs_get_tree(struct fs_context *fc) { struct bch_fs *c; @@ -2142,7 +2134,6 @@ static int bch2_fs_get_tree(struct fs_context *fc) if (opt_defined(opts, discard)) set_bit(BCH_FS_discard_mount_opt_set, &c->flags); - set_mount_opts(c, &opts); /* Some options can't be parsed until after the fs is started: */ opts = bch2_opts_empty(); @@ -2151,7 +2142,6 @@ static int bch2_fs_get_tree(struct fs_context *fc) goto err_stop_fs; bch2_opts_apply(&c->opts, opts); - set_mount_opts(c, &opts); ret = bch2_fs_start(c); if (ret)