summaryrefslogtreecommitdiff
path: root/fs/bcachefs/lru.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-01-04 07:54:10 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:09:52 +0300
commit629a21b621c466deac6e7ce20242308091f09735 (patch)
treeb91390439357a9b087cc49ea65f03d95701464cf /fs/bcachefs/lru.h
parent46eea9cb9ec14684d1b6e90c17db1ac896f26a5b (diff)
downloadlinux-629a21b621c466deac6e7ce20242308091f09735.tar.xz
bcachefs: Improve invalidate_one_bucket() error messages
Make sure to check for lru entries that point to buckets that don't exist as well as buckets in the wrong state, and improve the error message we print out. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
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 0cfc7459711b..b8d9848cdb1a 100644
--- a/fs/bcachefs/lru.h
+++ b/fs/bcachefs/lru.h
@@ -25,6 +25,8 @@ static inline u64 lru_pos_time(struct bpos pos)
int bch2_lru_invalid(const struct bch_fs *, struct bkey_s_c, unsigned, struct printbuf *);
void bch2_lru_to_text(struct printbuf *, struct bch_fs *, struct bkey_s_c);
+void bch2_lru_pos_to_text(struct printbuf *, struct bpos);
+
#define bch2_bkey_ops_lru ((struct bkey_ops) { \
.key_invalid = bch2_lru_invalid, \
.val_to_text = bch2_lru_to_text, \