diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2022-09-26 16:23:19 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:42 -0400 |
commit | c23a9e088259193dc883371cf49c99fed675e951 (patch) | |
tree | 2c58346326a4131dc826fc8643694436ddcad322 /fs/bcachefs/super-io.c | |
parent | 3f3bc66ef0601e425a3c2901b34a825d4166da63 (diff) | |
download | linux-c23a9e088259193dc883371cf49c99fed675e951.tar.gz linux-c23a9e088259193dc883371cf49c99fed675e951.tar.bz2 linux-c23a9e088259193dc883371cf49c99fed675e951.zip |
bcachefs: Improve jset_validate()
Previously, jset_validate() was formatting the initial part of an error
string for every entry it validating - expensive.
This moves that code to journal_entry_err_msg(), which is now only
called if there's an actual error.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/super-io.c')
-rw-r--r-- | fs/bcachefs/super-io.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/super-io.c b/fs/bcachefs/super-io.c index 12edd4b9a44b..2a347efdbd83 100644 --- a/fs/bcachefs/super-io.c +++ b/fs/bcachefs/super-io.c @@ -1161,7 +1161,7 @@ int bch2_sb_clean_validate_late(struct bch_fs *c, struct bch_sb_field_clean *cle for (entry = clean->start; entry < (struct jset_entry *) vstruct_end(&clean->field); entry = vstruct_next(entry)) { - ret = bch2_journal_entry_validate(c, "superblock", entry, + ret = bch2_journal_entry_validate(c, NULL, entry, le16_to_cpu(c->disk_sb.sb->version), BCH_SB_BIG_ENDIAN(c->disk_sb.sb), write); |