-
Notifications
You must be signed in to change notification settings - Fork 81
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
Conversation
774226b
to
0983742
Compare
0983742
to
ad86ce0
Compare
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. |
22191a0
to
bd43cf2
Compare
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.
bd43cf2
to
95c98e9
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.
Looks good to me! 👍
Will merge after #1223.
Providing headers and payloads separately allows us to avoid the complexity associated with dynamically-sized types and in some cases copying.