Skip to content

fuse: fix inode initialization race#134

Merged
bsbernd merged 1 commit intoDDNStorage:redfs-rhel9_6-570.12.1from
hbirth:redfs-rhel9_6-570.12.1
Mar 19, 2026
Merged

fuse: fix inode initialization race#134
bsbernd merged 1 commit intoDDNStorage:redfs-rhel9_6-570.12.1from
hbirth:redfs-rhel9_6-570.12.1

Conversation

@hbirth
Copy link
Collaborator

@hbirth hbirth commented Mar 18, 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.

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

(cherry picked from commit 03eacfd)

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.

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

Signed-off-by: Horst Birthelmer <hbirthelmer@ddn.com>
(cherry picked from commit 03eacfd)
@hbirth hbirth requested a review from bsbernd March 18, 2026 09:25
@bsbernd bsbernd merged commit 4d4ed3f into DDNStorage:redfs-rhel9_6-570.12.1 Mar 19, 2026
2 checks passed
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