Open the device read-only in vitastor-nbd unmap #162

Merged
vitalif merged 1 commits from koolkhel/vitastor:nbd-unmap-rdonly into master 2026-11-27 13:55:08 +03:00

1 Commits

Author SHA1 Message Date
7541e0390b Open the device read-only in vitastor-nbd unmap
vitastor-nbd unmap opened the NBD device read-write only to send
NBD_DISCONNECT. Closing a writable descriptor makes udev open the
device, and after the disconnect request the kernel then rereads the
partition table. If vitastor-nbd does not answer at that moment, for
example because it is stopped, udevd hangs in that read with the
device's open lock held, and the close in unmap waits for the same lock.
NBD_DISCONNECT needs no write access.
2026-11-24 12:55:22 +03:00