mirror of
https://github.com/versity/scoutfs.git
synced 2026-04-21 22:10:30 +00:00
We read into the item cache when we hit a region that isn't cached. Inode index items are created without cached range coverage. It's easy to trigger read attempts that overlap with dirty inode index items. insert_item() had a bug where it's notion of overwriting only applied to logical presence. It always let an insertion overwrite an existing item if it was a deletion. But that only makes sense for new item creation. Item cache population can't do this. In this inode index case it can replace a correct dirty inode index item with its old pre-deletion item from the read. This clobbers the deletions and leaks the old inode index item versions. So teach the item insertion for caching to never, ever, replace an existing item. This fixes assertion failures from trying to immediately walk meta seq items after creating a few thousand dirty entries. Signed-off-by: Zach Brown <zab@versity.com>