]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/librbd/operation/SnapshotCreateRequest.cc
import ceph 14.2.5
[ceph.git] / ceph / src / librbd / operation / SnapshotCreateRequest.cc
index 31553177306f0183335f3abaea910d5b68d42ef8..66293609166e1d1ad90a59a452d1d299aad060c9 100644 (file)
@@ -36,6 +36,15 @@ SnapshotCreateRequest<I>::SnapshotCreateRequest(I &image_ctx,
 
 template <typename I>
 void SnapshotCreateRequest<I>::send_op() {
+  I &image_ctx = this->m_image_ctx;
+  CephContext *cct = image_ctx.cct;
+
+  if (!image_ctx.data_ctx.is_valid()) {
+    lderr(cct) << "missing data pool" << dendl;
+    this->async_complete(-ENODEV);
+    return;
+  }
+
   send_suspend_requests();
 }