summaryrefslogtreecommitdiff
path: root/fs/bcachefs/lru.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2022-04-11 02:59:26 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:09:31 +0300
commit7003589dabcdfd10345ede31044ce5e13ee65e7f (patch)
treec34b49a991b90bea0cdfab392e20063e40d2c4a8 /fs/bcachefs/lru.h
parent84befe8ef9a07be1cd9bac4e1a1c66c667f71499 (diff)
downloadlinux-7003589dabcdfd10345ede31044ce5e13ee65e7f.tar.xz
bcachefs: Ensure buckets have io_time[READ] set
It's an error if a bucket is in state BCH_DATA_cached but not on the LRU btree - i.e io_time[READ] == 0 - so, make sure it's set before adding it. Also, make some of the LRU code a bit clearer and more direct. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/lru.h')
-rw-r--r--fs/bcachefs/lru.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/bcachefs/lru.h b/fs/bcachefs/lru.h
index e8f508174b0a..0a01836c07c1 100644
--- a/fs/bcachefs/lru.h
+++ b/fs/bcachefs/lru.h
@@ -10,6 +10,8 @@ void bch2_lru_to_text(struct printbuf *, struct bch_fs *, struct bkey_s_c);
.val_to_text = bch2_lru_to_text, \
}
+int bch2_lru_delete(struct btree_trans *, u64, u64, u64);
+int bch2_lru_set(struct btree_trans *, u64, u64, u64 *);
int bch2_lru_change(struct btree_trans *, u64, u64, u64, u64 *);
int bch2_check_lrus(struct bch_fs *, bool);