Don't need to increment the refresh_seq since the async op fails.
Signed-off-by: Zhiqiang Wang <zhiqiang.wang@intel.com>
bufferlist bl;
::encode(NotifyMessage(AsyncCompletePayload(request, r)), bl);
- librbd::notify_change(m_image_ctx.md_ctx, m_image_ctx.header_oid,
- &m_image_ctx);
+ if (r >= 0) {
+ librbd::notify_change(m_image_ctx.md_ctx, m_image_ctx.header_oid,
+ &m_image_ctx);
+ }
int ret = m_image_ctx.md_ctx.notify2(m_image_ctx.header_oid, bl,
NOTIFY_TIMEOUT, NULL);
if (ret < 0) {