Skip to content
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

fuse: provide header and payloads separately #1204

Merged
merged 7 commits into from
May 22, 2024

Conversation

cagatay-y
Copy link
Contributor

@cagatay-y cagatay-y commented May 17, 2024

Providing headers and payloads separately allows us to avoid the complexity associated with dynamically-sized types and in some cases copying.

@stlankes stlankes requested review from stlankes and removed request for stlankes May 17, 2024 12:08
@cagatay-y cagatay-y force-pushed the too-virtq-too-refactor branch 2 times, most recently from 774226b to 0983742 Compare May 22, 2024 06:40
@cagatay-y cagatay-y changed the title Make virtq safer fuse: provide header and payloads separately May 22, 2024
@cagatay-y
Copy link
Contributor Author

813ad43 does not really fit into the theme of this PR as originally the branch was intended to be a more general Virtio work and only later I realized the parts related to FUSE can be merged independently. I can remove the commit, if you prefer.

@cagatay-y cagatay-y force-pushed the too-virtq-too-refactor branch 2 times, most recently from 22191a0 to bd43cf2 Compare May 22, 2024 11:22
Remove the functionality in prep_transfer_from_raw for splitting a single buffer into multiple descriptors, as it does not have an advantage and complicates the method quite a bit.
Match cases made out of combinations cause a lot of code duplication.
This will allow providing transfer data that has an unsized field as a pair of sized and unsized objects, rather than having to create the whole transfer as a dynamically-sized object, as is the case in virtiofs.
Virtio allows a single transfer to be split into multiple buffers. Using this functionality, we can provide the header and the payload in FUSE requests separately. This in turn allows us to avoid the unsafe operations associated with dynamically-sized object creation.
@cagatay-y cagatay-y marked this pull request as ready for review May 22, 2024 13:33
Copy link
Member

@mkroening mkroening left a comment

Choose a reason for hiding this comment

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

Looks good to me! 👍

Will merge after #1223.

@stlankes stlankes added this pull request to the merge queue May 22, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 22, 2024
@mkroening mkroening added this pull request to the merge queue May 22, 2024
Merged via the queue into hermit-os:main with commit 1646570 May 22, 2024
13 checks passed
@cagatay-y cagatay-y deleted the too-virtq-too-refactor branch May 24, 2024 20:44
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.

None yet

2 participants