bcachefs: Check for lru entries with time=0

These are invalid.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2023-01-04 00:00:55 -05:00
parent d7dd3fb84f
commit 9fea089a95

View File

@ -19,6 +19,12 @@ int bch2_lru_invalid(const struct bch_fs *c, struct bkey_s_c k,
return -BCH_ERR_invalid_bkey;
}
if (!k.k->p.offset) {
prt_printf(err, "lru entry at time=0");
return -BCH_ERR_invalid_bkey;
}
return 0;
}