Skip to content

Properly handle errors from the fuse device.#201

Merged
imeoer merged 1 commit intocloud-hypervisor:masterfrom
nrath-js:detect-unmount
Mar 18, 2026
Merged

Properly handle errors from the fuse device.#201
imeoer merged 1 commit intocloud-hypervisor:masterfrom
nrath-js:detect-unmount

Conversation

@nrath-js
Copy link
Copy Markdown
Contributor

@nrath-js nrath-js commented Dec 4, 2024

At the moment, we are indiscriminately returning a SessionFailure("epoll error")
if any of the registered file descriptors would return an error upon read. This
means that the more detailed error handling code below can never be reached.

Instead, attempt to read from fuse device when the device is either
readable or has an error state, and then handle the error as we always
intended.

Fixes: #197.

At the moment, we are indiscriminately returning a SessionFailure("epoll error")
if any of the registered file descriptors would return an error upon read. This
means that the more detailed error handling code below can never be reached.

Instead, attempt to read from fuse device when the device is either
readable *or* has an error state, and then handle the error as we always
intended.

Fixes: cloud-hypervisor#197.
@georgyo
Copy link
Copy Markdown

georgyo commented Mar 17, 2026

@bergwolf @eryugey @imeoer @liubogithub We still think these patches are important. Is there any chance to get these reviewed?

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes FUSE transport error handling by ensuring epoll error events for the FUSE device are routed through the existing read-path error handling (instead of being converted into a generic "epoll error" failure), enabling graceful handling of normal unmount scenarios (Fixes #197).

Changes:

  • Treat event.is_error() for the FUSE device the same as readable readiness, so the code proceeds to read() and uses the detailed Errno-based handling already implemented.
  • Remove the generic "epoll error" early-return that previously prevented reaching the read() error handling logic.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Copy link
Copy Markdown
Collaborator

@imeoer imeoer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late reply, LGTM!

@imeoer imeoer merged commit b226095 into cloud-hypervisor:master Mar 18, 2026
4 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.

Gracefully handling unmount when using FUSE transport

4 participants