Skip to content

[WasmFS] Allow removeChild to return specific error codes, and use it in OPFS#17793

Merged
kripken merged 5 commits into
mainfrom
wasmfs.err.removeChild
Sep 6, 2022
Merged

[WasmFS] Allow removeChild to return specific error codes, and use it in OPFS#17793
kripken merged 5 commits into
mainfrom
wasmfs.err.removeChild

Conversation

@kripken
Copy link
Copy Markdown
Member

@kripken kripken commented Sep 2, 2022

No description provided.

@kripken kripken requested a review from tlively September 2, 2022 16:52
Copy link
Copy Markdown
Member

@tlively tlively left a comment

Choose a reason for hiding this comment

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

Great, thanks!

Comment thread system/lib/wasmfs/file.h Outdated
Comment thread system/lib/wasmfs/file.h Outdated
throw "Did not get expected EIO when resizing file";
}

if (Module._try_unlink() != 0) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We can also add another call to Module._try_unlink() down below after the access.close() to check that closing the out-of-band AccessHandle is enough to make the unlink work.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done. I had to add close() operations in the read and write calls in that test (otherwise an open fd prevents the unlink).

Comment thread system/lib/wasmfs/backends/node_backend.cpp Outdated
kripken and others added 2 commits September 6, 2022 09:19
Co-authored-by: Thomas Lively <7121787+tlively@users.noreply.github.com>
@kripken kripken merged commit 43e3009 into main Sep 6, 2022
@kripken kripken deleted the wasmfs.err.removeChild branch September 6, 2022 17:39
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.

2 participants