Right now, WNBD provides two IO transmission channels:
nbd - initial implementation
DeviceIoControl based API - used by rbd-wnbd
rbd-wnbd no longer uses NBD, however we'll continue to offer the NBD client functionality for the following reasons:
one of the very few Windows NBD clients out there, pretty well received by the community
allows connecting to a variety of NBD servers, including qemu-nbd
useful for testing purposes
We'll move the NBD client to userspace (libwnbd.dll), leveraging the DeviceIoControl API for driver communication. Main benefits:
simplifies the driver and allows us to drop the ksocket dependency
20% perf improvement (WSK is quite slow, especially on older Windows versions)
reduces the risk of crashes or security issues
easier to maintain
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.
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 theWin32_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