From: Jason Dillaman Date: Tue, 16 Jan 2018 20:37:32 +0000 (-0500) Subject: librbd: group image add/remove ops should notify update X-Git-Tag: v13.0.2~426^2~12 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0ce2c8344f82be26332da8a1ce13f281531f64c5;p=ceph.git librbd: group image add/remove ops should notify update Signed-off-by: Jason Dillaman --- diff --git a/src/librbd/api/Group.cc b/src/librbd/api/Group.cc index 07fbd6d403fd..e6deec1cc1ef 100644 --- a/src/librbd/api/Group.cc +++ b/src/librbd/api/Group.cc @@ -7,6 +7,7 @@ #include "librbd/api/Group.h" #include "librbd/ImageCtx.h" #include "librbd/ImageState.h" +#include "librbd/ImageWatcher.h" #include "librbd/Operations.h" #include "librbd/Utils.h" #include "librbd/io/AioCompletion.h" @@ -190,6 +191,8 @@ int group_image_remove(librados::IoCtx& group_ioctx, string group_id, lderr(cct) << "couldn't remove group reference from image" << cpp_strerror(-r) << dendl; return r; + } else if (r >= 0) { + ImageWatcher<>::notify_header_update(image_ioctx, image_header_oid); } r = cls_client::group_image_remove(&group_ioctx, group_header_oid, spec); @@ -548,6 +551,7 @@ int Group::image_add(librados::IoCtx& group_ioctx, const char *group_name, // Ignore errors in the clean up procedure. return r; } + ImageWatcher<>::notify_header_update(image_ioctx, image_header_oid); r = cls_client::group_image_set(&group_ioctx, group_header_oid, attached_st);