diff options
author | Daniel Hill <daniel@gluo.nz> | 2022-02-23 01:25:03 +1300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2022-05-30 18:17:14 -0400 |
commit | f3b132c8fcdca93612c99e7b0c4d6ae1b2567b0d (patch) | |
tree | 4399082d8d3f5d4bc051051bc07d13163213b344 | |
parent | 3c4042a9de1680d57b8ad5ccd880f4d560e5316b (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) |