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

Introduce the common module. #84

Merged
merged 5 commits into from
Jul 14, 2022
Merged

Conversation

wllenyj
Copy link
Contributor

@wllenyj wllenyj commented Jul 12, 2022

Major changes include.

  • move some utilities from transport module to common module.
  • temporarily include tokio-uring into common module.
  • introdude wrapper for async File and async Runtime.
  • remove pub use file_trait in transport module.

The tokio-uring is based on tokio-rs/tokio-uring@6cacd95

with three more PRs applied:
tokio-rs/tokio-uring#87
tokio-rs/tokio-uring#88
tokio-rs/tokio-uring#89 got merged now:)

Signed-off-by: wllenyj <wllenyj@linux.alibaba.com>
@@ -93,3 +93,6 @@ impl FuseServer {
This project is licensed under
- [Apache License](http://www.apache.org/licenses/LICENSE-2.0), Version 2.0
- [BSD-3-Clause License](https://opensource.org/licenses/BSD-3-Clause)

Source code under [src/tokio-uring] is temporarily copied from [tokio-uring](https://github.com/tokio-rs/tokio-uring)
with modifications, which is licensed under [MIT](https://github.com/tokio-rs/tokio-uring/blob/master/LICENSE).
Copy link
Contributor

@bergwolf bergwolf Jul 13, 2022

Choose a reason for hiding this comment

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

Could you list corresponding upstream tokio-uring PRs? So that we can drop the code once the changes are merged.

Also, another way (other than copying the code here) is to fork tokio-uring somewhere and make fuse-backend-rs depend on the fork temporarily. The advantage is that it would be clear what is changed from tokio-uring and it's possible to rebase/merge tokio-uring upstream changes while the proposed changes are still under review.

Copy link
Contributor

Choose a reason for hiding this comment

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

If we temporarily fork the tokio-uring crate, we must publish that forked tokio-uring crate before we could publish the fuse-backend-rs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

crates.io does not allow packages to be published with git dependencies and path dependencies.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok, I see. Let's live with it in fuse-backend-rs then. But still, please list out the ongoing tokio-uring PRs so that we know when to drop the in-tree tokio-uring later on. Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added
Please reveiw again.

Tempoarily include tokio-uring into dbs-fuse, so we could publish
dbs-fuse. We will switch to upstream crate once our enhancements
have been merged and new version is available.

Signed-off-by: wllenyj <wllenyj@linux.alibaba.com>
Signed-off-by: Jiang Liu <gerry@linux.alibaba.com>
Async File wrapper for tokio::File and tokio_uring::File.
Async runtime supports tokio and tokio-uring.

Signed-off-by: wllenyj <wllenyj@linux.alibaba.com>
Signed-off-by: Jiang Liu <gerry@linux.alibaba.com>
Use file_traits directly.

Signed-off-by: wllenyj <wllenyj@linux.alibaba.com>
```
error: this lifetime isn't used in the impl
--> src/passthrough/mod.rs:139:6
|
139| impl<'a> InodeData {
| ^^
|
= note: `-D clippy::extra-unused-lifetimes` implied by `-D warnings`
= help: for further information visit
https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes
```

Signed-off-by: wllenyj <wllenyj@linux.alibaba.com>
@jiangliu
Copy link
Contributor

The tokio-uring is based on tokio-rs/tokio-uring@6cacd95

with three more PRs applied:
tokio-rs/tokio-uring#87
tokio-rs/tokio-uring#88
tokio-rs/tokio-uring#89

@jiangliu
Copy link
Contributor

tokio-rs/tokio-uring#89 got merged now:)

Copy link
Contributor

@bergwolf bergwolf left a comment

Choose a reason for hiding this comment

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

Thanks a lot!

@bergwolf bergwolf merged commit 52e6522 into cloud-hypervisor:master Jul 14, 2022
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.

3 participants