fix(fuse): clean up partial read setup - #425
Open
OllieinCanada wants to merge 2 commits into
Open
Conversation
added 2 commits
August 24, 2026 01:51
Signed-off-by: Oliver Slapinski <olliefromcanada@gmail.com>
Signed-off-by: Oliver Slapinski <olliefromcanada@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #424
Summary
Preserve setup failures from
hf3fs_fuse.io.read_file()and clean up only theresources that were successfully acquired.
Root cause
The cleanup block unconditionally referenced
fd,ior,iov, andshm.When file opening, native registration, shared-memory creation, iovec creation,
or ioring creation failed, an
UnboundLocalErrorcould replace the usefuloriginal exception. Failures after shared-memory creation could also skip its
close()andunlink()calls.Fix
Successful read behavior and cleanup order remain unchanged. This also lets an
underlying
make_iovec()error such as #291 surface correctly; it does notattempt to solve #291's separate symlink failure.
Tests
A host-only test with a stubbed native binding covers:
os.open()failureValidation:
No 3FS mount, RDMA device, external service, or new dependency is required for
the regression test. The full deployment-dependent 3FS suite was not run in
this environment.