Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When the tcmu-runner detect that the lock is lost, it will try to queue a work event to reopen the image and at the same time queue a work event to update the service status. While the reopen is not atomic, and there has a gap between image close and image open, during which the rbd image's state resource will be released and if the update status event is fired, we will hit the crash bug. This commit will add one rdev->priv_lock to protect the private data in rdev struct. For the service status updating code just skip it if it's in the reopen gap. And for all the other IOs just return EBUSY to let the client try it again. Signed-off-by: Xiubo Li <[email protected]>
- Loading branch information