Describe the bug
release reconstructs the inode path before calling release_handle. If an inode ancestor has been evicted from dcache, path reconstruction returns early and the handle is never removed. Its writer is neither completed nor cancelled, and deferred deletion is skipped.
This can leak handles and writers and can lose buffered data.
To Reproduce
- Open a file with a writer.
- Unlink the file while keeping the handle open.
- Continue writing and wait beyond
node_cache_ttl so an empty ancestor can be evicted.
- Close the file.
- Observe path reconstruction fail before handle cleanup.
Expected behavior
Every release path must remove the handle exactly once and complete or safely cancel its writer even when dcache path reconstruction, lock cleanup, or deferred deletion fails.
OS Version (please complete the following information):
- Linux
- Curvine branch: current
main
- Component:
curvine-fuse handle/dcache lifecycle
Additional context
Goal:
- Retain a stable release path or backend identity in the handle.
- Reorder release into a finally-style cleanup flow.
- Preserve the first operation error without skipping later resource cleanup.
- Add open → unlink → write → cleaner → release regression coverage.
Not goal:
- A complete redesign of all inode references, hardlinks, and request ordering.
Related: #1221 tracks retrying cleanup after cleanup work itself has failed. This issue covers the earlier path-reconstruction return that can prevent cleanup from starting at all.
Describe the bug
releasereconstructs the inode path before callingrelease_handle. If an inode ancestor has been evicted from dcache, path reconstruction returns early and the handle is never removed. Its writer is neither completed nor cancelled, and deferred deletion is skipped.This can leak handles and writers and can lose buffered data.
To Reproduce
node_cache_ttlso an empty ancestor can be evicted.Expected behavior
Every release path must remove the handle exactly once and complete or safely cancel its writer even when dcache path reconstruction, lock cleanup, or deferred deletion fails.
OS Version (please complete the following information):
maincurvine-fusehandle/dcache lifecycleAdditional context
Goal:
Not goal:
Related: #1221 tracks retrying cleanup after cleanup work itself has failed. This issue covers the earlier path-reconstruction return that can prevent cleanup from starting at all.