Zach Brown ef551776ae scoutfs: item cache reads shouldn't clobber dirty
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>
2017-06-27 14:04:38 -07:00
Description
No description provided
6.7 MiB
Languages
C 86.4%
Shell 10%
Roff 2.5%
TeX 0.8%
Makefile 0.3%