]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/librados/IoCtxImpl.cc
update sources to 12.2.8
[ceph.git] / ceph / src / librados / IoCtxImpl.cc
index dbd0818da61567c159f640fadb2a3c1c8d080fa5..b2a3f1701640a3a0e38efdb59339445b9eb6ab08 100644 (file)
@@ -2017,9 +2017,11 @@ void librados::IoCtxImpl::C_aio_Complete::finish(int r)
   c->cond.Signal();
 
   if (r == 0 && c->blp && c->blp->length() > 0) {
-    if (c->out_buf && !c->blp->is_provided_buffer(c->out_buf))
-      c->blp->copy(0, c->blp->length(), c->out_buf);
-    c->rval = c->blp->length();
+    if (c->out_buf && !c->blp->is_contiguous()) {
+      c->rval = -ERANGE;
+    } else {
+      c->rval = c->blp->length();
+    }
   }
 
   if (c->callback_complete ||