-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[WasmFS] Allow backends to report errors from flush
#17781
Conversation
Current dependencies on/for this PR:
This comment was auto-generated by Graphite. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
__wasi_fd_sync
calls flush
in syscalls.cpp
, I think that needs to check the return value now? lgtm with that.
await accessHandle.flush(); | ||
} catch { | ||
let err = -{{{ cDefine('EIO') }}}; | ||
{{{ makeSetValue('errPtr', 0, 'err', 'i32') }}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this adds errPtr
since there wasn't an existing return value to reuse? Just want to make sure I understand the convention.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, exactly. That's what was happening before with setSize
as well.
Oh right, I forgot that I had been adding |
410395b
to
f449ced
Compare
d8dd6fc
to
5dffb10
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, but the off_t change could be in a separate PR?
Oops, yeah, I meant to put that in the next PR. |
And catch and report such errors in the OPFS backend to prevent errors from causing the async task to hang and create deadlocks.
5dffb10
to
af3d713
Compare
And catch and report such errors in the OPFS backend to prevent errors from
causing the async task to hang and create deadlocks.