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

Add io_uring backend #68

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open

Add io_uring backend #68

wants to merge 13 commits into from

Conversation

doublej472
Copy link

This PR adds a new backend using io_uring with the liburing library, supporting both file and block device backends.

I've been running this at home for a few months without issue, and figured it's about time I open a PR to bring it into upstream.

This backend supports WRITE, READ, SYNCHRONIZE_CACHE, and UNMAP operations

UNMAP is handled a bit special, since we can receive multiple in a single request, and need to perform a different action depending on if the backing device is a block device or regular file.

  • For regular files, we submit a group of linked fallocate SQE's with FALLOC_FL_PUNCH_HOLE and FALLOC_FL_KEEP_SIZE.
  • For devices, we need to perform synchonous BLKDISCARD requests. Once https://patchwork.kernel.org/project/io-uring/patch/[email protected]/ hits stable we can perform DISCARD requests in io_uring, but we still need to wait for that to make it into the stable kernel, and for liburing to be updated.

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.

1 participant