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

_set_sqe_cmd_op: Simplify the code - direct variable access #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bsbernd
Copy link

@bsbernd bsbernd commented Aug 23, 2022

Members of the union can be accessed directly using the other
union member off is not needed here.

Members of the union can be accessed directly using the other
union member off is not needed here.

addr[0] = cmd_op;
addr[1] = 0;
sqe->cmd_op = cmd_op;
Copy link
Collaborator

Choose a reason for hiding this comment

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

When I write ublksrv, the header isn't updated yet, even though SQE128 is supported. It is just fine to use the current way, at least it still can build successfully against old header.

But your patch is fine, and I will apply it after automake patches are merged,
and liburing2.2 is required explicitly by that patchset.

Copy link
Author

Choose a reason for hiding this comment

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

Sure! I didn't know about the history and didn't check liburing versions. I'm just going through the code to understand how it works and how I can use it for fuse.

Copy link
Collaborator

Choose a reason for hiding this comment

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

BTW, just curious how you use it for fuse? I understand fuse is userspace FS, and look it needn't one block device.

@bsbernd
Copy link
Author

bsbernd commented Aug 23, 2022

I'm not too much interested in the block device part right now, I was just looking how the IORING_OP_URING_CMD works. It is an interesting idea to send an SQE from userspace and to let it wait until the kernel needs it - I guess I can do exactly the same for fuse.
I'm also interested in zero-copy, but looks like this is not implemented in ubd yet. Existing splice in fuse doesn't work perfectly for us (network file system) - it just ends up as a bit faster memory copy.

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