oll3 / nbd-async

Block device driver in userspace!
https://crates.io/crates/nbd-async
MIT License
8 stars 7 forks source link

wip, separating interfaces #5

Closed oll3 closed 4 years ago

joshtriplett commented 4 years ago

Moving comment from #1 to here:

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.

oll3 commented 4 years ago

Moving comment from #1 to here:

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.

Seems reasonable, didn't think too much about naming. Changed it now anyway. Will merge, but feel free to purpose further improvements.