Skip to content

Conversation

@hbirth
Copy link
Collaborator

@hbirth hbirth commented Jan 16, 2026

Fix a race between fuse_iget() and fuse_reverse_inval_inode() where invalidation can arrive while an inode is being initialized, causing the invalidation to be lost.

Add a waitqueue to make fuse_reverse_inval_inode() wait when it encounters an inode with attr_version == 0 (still initializing). When fuse_change_attributes_common() completes initialization, it wakes waiting threads. The woken thread also wakes other waiters to handle multiple concurrent invalidations.

This ensures invalidations are properly serialized with inode initialization, maintaining cache coherency.

@hbirth hbirth requested a review from bsbernd January 16, 2026 12:47
@hbirth hbirth force-pushed the race-attr-iget-waitq branch from 52a4f13 to 11ec489 Compare January 20, 2026 19:34
Fix a race between fuse_iget() and fuse_reverse_inval_inode() where
invalidation can arrive while an inode is being initialized, causing
the invalidation to be lost.

Add a waitqueue to make fuse_reverse_inval_inode() wait when it
encounters an inode with attr_version == 0 (still initializing).
When fuse_change_attributes_common() completes initialization, it
wakes waiting threads. The woken thread also wakes other waiters
to handle multiple concurrent invalidations.

This ensures invalidations are properly serialized with inode
initialization, maintaining cache coherency.

Signed-off-by: Horst Birthelmer <hbirthelmer@ddn.com>
@hbirth hbirth force-pushed the race-attr-iget-waitq branch from 11ec489 to a9cdbef Compare January 20, 2026 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants