Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
librbd: avoid calling ImageUpdateWatchers twice
Problem: ------- DisableFeaturesRequest calls send_notify_update, which actually calls ImageCtx::notify_update, which is currently: void ImageCtx::notify_update() { state->handle_update_notification(); ImageWatcher<>::notify_header_update(md_ctx, header_oid); } The state->handle_update_notification() will fire ImageUpdateWatchers notifications but does not wait for it to complete and then it calls ImageWatcher<>::notify_header_update, which will send the "header update" notification for all image watchers, including itself, so it will receive it itself and will fire ImageUpdateWatchers the second time interfering with the first call. Solution: -------- we don't need state->handle_update_notification() in ImageCtx::notify_update() as we are going to receive our own notification anyway, here we are just dropping it. Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
- Loading branch information