diff options
author | Daniel Hill <daniel@gluo.nz> | 2022-02-23 01:25:03 +1300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2022-03-13 19:13:15 -0400 |
commit | e7643440cf2c14b650cf0f99315926ec1f335aaf (patch) | |
tree | 0be8e3fb1d43e74858b3c549bb114c63e5a3c08a | |
parent | caa7a220c02b7330f5e6d884fafee01bca6b32a4 (diff) |
bcachefs: Fix LRU repair code
Don't run triggers when repairing incorrect/missing lru entries Triggers
create a conflicting call to lru_change() with the incorrect lru ptr,
lru_change attempts to delete this incorrect lru entry, and fails
because the back ptr doesn't match the original bucket causing fsck to
error.
Signed-off-by: Daniel Hill <daniel@gluo.nz>
-rw-r--r-- | fs/bcachefs/alloc_background.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/alloc_background.c b/fs/bcachefs/alloc_background.c index b344705572cc..da7c665773d2 100644 --- a/fs/bcachefs/alloc_background.c +++ b/fs/bcachefs/alloc_background.c @@ -646,7 +646,7 @@ static int bch2_check_alloc_key(struct btree_trans *trans, ret = bch2_lru_change(trans, a.dev, a.bucket, 0, &a.read_time) ?: (a.read_time != read_time - ? bch2_alloc_write(trans, alloc_iter, &a, 0) + ? bch2_alloc_write(trans, alloc_iter, &a, BTREE_TRIGGER_NORUN) : 0) ?: bch2_trans_commit(trans, NULL, NULL, 0); if (ret) |