cloudbase / wnbd

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

Kernel mode drive usermode and not kernel mode > why? #134

Closed vkornilyev1988 closed 1 year ago

vkornilyev1988 commented 1 year ago

Hi, Why ? May I ask. Why was the new driver chosen to run in user mode rather than kernel mode? This limits its use to user mode only. Why can't you do the work in user mode and still have the ability to work with connections in the kernel, like nbd linux? After all, your first releases worked in the kernel. This is very important for me, since for corporate use ceph and nbd could be bootable for the system. And now it's cut it off. In principle, I would just like to understand whether corrections can be made to the old driver that works entirely in kernel mode for better performance, and then it will be just great! or add with the new driver the ability to connect a disk from the kernel as in the old driver, just like in Linux, example Linux: vmlinux nbd:xx:xx:xx:xx:port. To be able to boot from disk using all the new kernel features

petrutlucian94 commented 1 year ago

The WNBD driver still runs in kernel mode. However, it's just a shim that forwards SCSI requests to userspace daemons such as the Ceph rbd-wnbd daemon or wnbd-client when acting as an NBD client.

The PR that moved the NBD client out of the driver describes the reasons for doing so: https://github.com/cloudbase/wnbd/pull/122.

About Ceph, at first we used NBD to map RBD images because:

At some point, we decided to implement another IO channel because of NBD limitations:

Having an entire Ceph RBD client implemented in kernel space was a no go for us since that implies duplicating the librbd functionality and would be very difficult to maintain, while having little to no benefits.

We really don't intend to move the NBD client back to the driver, the cons outweight the pros. If you absolutely need this, feel free to use an older WNBD version or even fork it.

vkornilyev1988 commented 1 year ago

Hello. Yes, it is reasonable about what you wrote. Now it becomes clear. Thank you for the answer. Could you please tell me what kind of fork it is? Does the fork you are writing about exist?

petrutlucian94 commented 1 year ago

Just a simple Github fork where you can add your custom patches, starting from a previous wnbd release that still had the NBD client as part of the driver.

petrutlucian94 commented 1 year ago

I'll close this issue, let me know if you have any further questions.