summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2022-05-26 15:17:37 -0400
committerKent Overstreet <kent.overstreet@gmail.com>2022-05-30 18:17:24 -0400
commite05ad481ece06dca30c730ff37a0cf1b729984c5 (patch)
treefc429154976878813d62e7011bc4a84e518ea62e
parentf1d88618fb1c23692acdd1b456b33db24b4ac90d (diff)
bcachefs: journal_transaction_name is now always on
We want this option always enabled - it costs practically nothing and it's an essential debugging tool. It's enabled by default, but old filesystems are still out there that need debugging, so let's just force it on and kill the option. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
-rw-r--r--fs/bcachefs/bcachefs_format.h1
-rw-r--r--fs/bcachefs/btree_types.h1
-rw-r--r--fs/bcachefs/btree_update_leaf.c11
-rw-r--r--fs/bcachefs/opts.h5
4 files changed, 5 insertions, 13 deletions
diff --git a/fs/bcachefs/bcachefs_format.h b/fs/bcachefs/bcachefs_format.h
index 0d7f84707c40..08ae6a36aec6 100644
--- a/fs/bcachefs/bcachefs_format.h
+++ b/fs/bcachefs/bcachefs_format.h
@@ -1553,6 +1553,7 @@ LE64_BITMASK(BCH_SB_INODES_USE_KEY_CACHE,struct bch_sb, flags[3], 29, 30);
LE64_BITMASK(BCH_SB_JOURNAL_FLUSH_DELAY,struct bch_sb, flags[3], 30, 62);
LE64_BITMASK(BCH_SB_JOURNAL_FLUSH_DISABLED,struct bch_sb, flags[3], 62, 63);
LE64_BITMASK(BCH_SB_JOURNAL_RECLAIM_DELAY,struct bch_sb, flags[4], 0, 32);
+/* Obsolete, always enabled: */
LE64_BITMASK(BCH_SB_JOURNAL_TRANSACTION_NAMES,struct bch_sb, flags[4], 32, 33);
/*
diff --git a/fs/bcachefs/btree_types.h b/fs/bcachefs/btree_types.h
index 73fe02587fd5..a1c0441940a5 100644
--- a/fs/bcachefs/btree_types.h
+++ b/fs/bcachefs/btree_types.h
@@ -397,7 +397,6 @@ struct btree_trans {
bool in_traverse_all:1;
bool restarted:1;
bool memory_allocation_failure:1;
- bool journal_transaction_names:1;
bool is_initial_gc:1;
/*
* For when bch2_trans_update notices we'll be splitting a compressed
diff --git a/fs/bcachefs/btree_update_leaf.c b/fs/bcachefs/btree_update_leaf.c
index 9a1bdced66a4..0b8194432c54 100644
--- a/fs/bcachefs/btree_update_leaf.c
+++ b/fs/bcachefs/btree_update_leaf.c
@@ -305,7 +305,7 @@ static inline int bch2_trans_journal_res_get(struct btree_trans *trans,
#define JSET_ENTRY_LOG_U64s 4
-static noinline void journal_transaction_name(struct btree_trans *trans)
+static void journal_transaction_name(struct btree_trans *trans)
{
struct bch_fs *c = trans->c;
struct jset_entry *entry = journal_res_entry(&c->journal, &trans->journal_res);
@@ -684,8 +684,7 @@ bch2_trans_commit_write_locked(struct btree_trans *trans,
if (ret)
return ret;
- if (unlikely(trans->journal_transaction_names))
- journal_transaction_name(trans);
+ journal_transaction_name(trans);
} else {
trans->journal_res.seq = c->journal.replay_journal_seq;
}
@@ -1118,10 +1117,8 @@ int __bch2_trans_commit(struct btree_trans *trans)
trans->journal_u64s = trans->extra_journal_entries.nr;
trans->journal_preres_u64s = 0;
- trans->journal_transaction_names = READ_ONCE(c->opts.journal_transaction_names);
-
- if (trans->journal_transaction_names)
- trans->journal_u64s += JSET_ENTRY_LOG_U64s;
+ /* For journalling transaction name: */
+ trans->journal_u64s += JSET_ENTRY_LOG_U64s;
trans_for_each_update(trans, i) {
BUG_ON(!i->path->should_be_locked);
diff --git a/fs/bcachefs/opts.h b/fs/bcachefs/opts.h
index 6a5584215607..54e3575f4d0a 100644
--- a/fs/bcachefs/opts.h
+++ b/fs/bcachefs/opts.h
@@ -331,11 +331,6 @@ enum opt_type {
OPT_BOOL(), \
BCH2_NO_SB_OPT, false, \
NULL, "Only read the journal, skip the rest of recovery")\
- x(journal_transaction_names, u8, \
- OPT_FS|OPT_FORMAT|OPT_MOUNT|OPT_RUNTIME, \
- OPT_BOOL(), \
- BCH_SB_JOURNAL_TRANSACTION_NAMES, true, \
- NULL, "Log transaction function names in journal") \
x(noexcl, u8, \
OPT_FS|OPT_MOUNT, \
OPT_BOOL(), \