Skip to content

fuse: fix inode initialization race#135

Merged
bsbernd merged 1 commit intoDDNStorage:redfs-rhel10_0from
hbirth:redfs-rhel10_0
Mar 19, 2026
Merged

fuse: fix inode initialization race#135
bsbernd merged 1 commit intoDDNStorage:redfs-rhel10_0from
hbirth:redfs-rhel10_0

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:58
@bsbernd bsbernd merged commit 96e94fc into DDNStorage:redfs-rhel10_0 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