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

Separate providing NBD from attaching NBD? #1

Closed
joshtriplett opened this issue Jun 23, 2020 · 4 comments
Closed

Separate providing NBD from attaching NBD? #1

joshtriplett opened this issue Jun 23, 2020 · 4 comments

Comments

@joshtriplett
Copy link
Contributor

Thank you for building this, it looks great!

One request: would you consider separating the interface for responding to NBD requests given a BlockDevice implementation from the interface for attaching an NBD socket to the local system? That would make it easy to hook the former up to a server socket, and to use the latter to attach a remote socket to a local NBD device.

@oll3
Copy link
Owner

oll3 commented Jun 28, 2020

Sure, sounds like a good idea. Would something like #5 sufficient?

@joshtriplett
Copy link
Contributor Author

That looks promising!

I would reverse the names of the two main functions, though; the function called serve_nbd is what I'd call attach_device and vice versa. The function that serves NBD protocol over a socket should be called serve_nbd, and the function that attaches a socket to a kernel NBD device should be called attach_device.

Otherwise, this looks good from inspection.

@joshtriplett
Copy link
Contributor Author

#5 fixed this; closing. Thank you!

@joshtriplett
Copy link
Contributor Author

Would you consider a new 0.2 release with the current changes included?

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

No branches or pull requests

2 participants