mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 08:02:27 +02:00
bcachefs: Add comment explaining why asserts in invalidate_one_bucket() are impossible
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
7606fb4d26
commit
b7f648e2ec
|
|
@ -2093,6 +2093,13 @@ static int invalidate_one_bucket(struct btree_trans *trans,
|
|||
if (lru_pos_time(lru_iter->pos) != alloc_lru_idx_read(a->v))
|
||||
goto out;
|
||||
|
||||
/*
|
||||
* Impossible since alloc_lru_idx_read() only returns nonzero if the
|
||||
* bucket is supposed to be on the cached bucket LRU (i.e.
|
||||
* BCH_DATA_cached)
|
||||
*
|
||||
* bch2_lru_validate() also disallows lru keys with lru_pos_time() == 0
|
||||
*/
|
||||
BUG_ON(a->v.data_type != BCH_DATA_cached);
|
||||
BUG_ON(a->v.dirty_sectors);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user