-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Log errors for block device close() #2188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi, I'd be interested in working on this issue. |
Hi and thank you for your interest. I will assign this issue to you. |
Hey @Jain98! I wonder if you are still looking/working on this issue? If not, I could tackle it since I've got some time on my hands. |
@berciuliviu feel free to take up the issue. |
Closed as duplicate to issue 2207 |
The file backing Firecracker's block device, like any other rust
File
is closed when going out of scope or when callingdrop
on theFile
, without any error handling: https://github.com/rust-lang/rust/blob/master/library/std/src/sys/unix/fd.rs#L284.This may be a design flaw of rust's
File
struct, since the linux man page states that:One thing we can do to ensure that the subsequent
close()
will run successfully is callingfsync()
on the file descriptor in advance.This can be done as a
Drop
implementation for theDiskProperties
member struct of the block device.As far as I can tell, there is not much we can do to handle the potential error and data loss, apart from logging it, which may still be useful.
The text was updated successfully, but these errors were encountered: