diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-04-10 18:12:04 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:31 -0400 |
commit | 84befe8ef9a07be1cd9bac4e1a1c66c667f71499 (patch) | |
tree | c2c80f4f53bc37b63942a6f93a359e5b625e3ec7 /fs/bcachefs/lru.c | |
parent | 3518e6faeff20d1de1f0c7388d9d9c6f2fe7f5a7 (diff) |
bcachefs: Use bch2_trans_inconsistent_on() in more places
This gets us better error messages.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/lru.c')
-rw-r--r-- | fs/bcachefs/lru.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/bcachefs/lru.c b/fs/bcachefs/lru.c index ef4b4a9f0d5f..d8180bc1c6b1 100644 --- a/fs/bcachefs/lru.c +++ b/fs/bcachefs/lru.c @@ -32,7 +32,6 @@ void bch2_lru_to_text(struct printbuf *out, struct bch_fs *c, static int lru_delete(struct btree_trans *trans, u64 id, u64 idx, u64 time) { - struct bch_fs *c = trans->c; struct btree_iter iter; struct bkey_s_c k; u64 existing_idx; @@ -51,7 +50,7 @@ static int lru_delete(struct btree_trans *trans, u64 id, u64 idx, u64 time) goto err; if (k.k->type != KEY_TYPE_lru) { - bch2_fs_inconsistent(c, + bch2_trans_inconsistent(trans, "pointer to nonexistent lru %llu:%llu", id, time); ret = -EIO; @@ -60,7 +59,7 @@ static int lru_delete(struct btree_trans *trans, u64 id, u64 idx, u64 time) existing_idx = le64_to_cpu(bkey_s_c_to_lru(k).v->idx); if (existing_idx != idx) { - bch2_fs_inconsistent(c, + bch2_trans_inconsistent(trans, "lru %llu:%llu with wrong backpointer: got %llu, should be %llu", id, time, existing_idx, idx); ret = -EIO; |