diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-04-11 01:59:26 +0200 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 23:09:31 +0200 |
commit | 7003589dabcdfd10345ede31044ce5e13ee65e7f (patch) | |
tree | c34b49a991b90bea0cdfab392e20063e40d2c4a8 /fs/bcachefs/lru.h | |
parent | bcachefs: Use bch2_trans_inconsistent_on() in more places (diff) | |
download | linux-7003589dabcdfd10345ede31044ce5e13ee65e7f.tar.xz linux-7003589dabcdfd10345ede31044ce5e13ee65e7f.zip |
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 '')
-rw-r--r-- | fs/bcachefs/lru.h | 2 |
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); |