cloudbase / wnbd

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

libwnbd: add WnbdPollDiskNumber function #129

Closed petrutlucian94 closed 11 months ago

petrutlucian94 commented 11 months ago

After mapping a WNBD disk, we're informimg the Storport driver that the bus changed, expecting it to rescan the bus and then expose the disk. This happens asynchronously and usually takes a few milliseconds, however it can take a few seconds under huge load.

WNBD clients need to wait for the disk to become available before being able to use it. For convenience, we'll add a function that performs the necessary polling, waiting for a disk number to be assigned. It optionally opens the disk, ensuring that it's ready.