cloudbase / wnbd

Windows Ceph RBD NBD driver
GNU Lesser General Public License v2.1
57 stars 26 forks source link

Move nbd to userspace #122

Closed petrutlucian94 closed 1 year ago

petrutlucian94 commented 1 year ago

Right now, WNBD provides two IO transmission channels:

rbd-wnbd no longer uses NBD, however we'll continue to offer the NBD client functionality for the following reasons:

We'll move the NBD client to userspace (libwnbd.dll), leveraging the DeviceIoControl API for driver communication. Main benefits:

The only potential downside to be aware of is that the wnbd-client map command becomes blocking. We might add an option to run the daemon in a separate process, however it would be killed when the session ends (i.e. winrm or ssh session). To avoid this, Ceph daemons are spawned by a centralized Windows service, however we aren't going to add such a service for NBD, at least for now. Other workarounds include NSSM or spawning the process using the Win32_Process WMI class.

While at it, we're bumping the c++ version to c++20, which is supported by VS 2019. Among other things, it simplifies structure initialization.

Signed-off-by: Lucian Petrut lpetrut@cloudbasesolutions.com