#include "librbd/Journal.h"
#include "librbd/ObjectMap.h"
#include "librbd/Operations.h"
+#include "librbd/TrashWatcher.h"
#include "librbd/Types.h"
#include "librbd/Utils.h"
#include "librbd/api/Image.h"
return r;
}
+ C_SaferCond notify_ctx;
+ TrashWatcher<>::notify_image_added(io_ctx, image_id, trash_image_spec,
+ ¬ify_ctx);
+ r = notify_ctx.wait();
+ if (r < 0) {
+ lderr(cct) << "failed to send update notification: " << cpp_strerror(r)
+ << dendl;
+ }
+
return 0;
}
<< " from rbd_trash object" << dendl;
return r;
}
+
+ C_SaferCond notify_ctx;
+ TrashWatcher<>::notify_image_removed(io_ctx, image_id, ¬ify_ctx);
+ r = notify_ctx.wait();
+ if (r < 0) {
+ lderr(cct) << "failed to send update notification: " << cpp_strerror(r)
+ << dendl;
+ }
+
return 0;
}
return r;
}
+ C_SaferCond notify_ctx;
+ TrashWatcher<>::notify_image_removed(io_ctx, image_id, ¬ify_ctx);
+ r = notify_ctx.wait();
+ if (r < 0) {
+ lderr(cct) << "failed to send update notification: " << cpp_strerror(r)
+ << dendl;
+ }
+
return 0;
}