cloudbase / wnbd

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

Fix unmap race conditions #49

Closed petrutlucian94 closed 3 years ago

petrutlucian94 commented 3 years ago

We're using the SCSI address when generating connection IDs as well as when handling PNP remove requests. This is prone to race conditions as the same SCSI address may be reused by a different device after an unmap.

We're going to use a counter instead of the address for the connection ID, just as we do for IO request tags. At the same time, we're going to check the device PDO when handling PNP events.