X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ceph%2Fsrc%2Frgw%2Frgw_tools.cc;h=b264ae14dd75b8be1f26aaf44daf76bf69947332;hb=f6b5b4d738b87d88d2de35127b6b0e41eae2a272;hp=b05fe0a0cc307c519fcf257042f7aa8159c6f7bf;hpb=12732ca2e80d168d344a265acffc1fbd1fa1f1b5;p=ceph.git diff --git a/ceph/src/rgw/rgw_tools.cc b/ceph/src/rgw/rgw_tools.cc index b05fe0a0c..b264ae14d 100644 --- a/ceph/src/rgw/rgw_tools.cc +++ b/ceph/src/rgw/rgw_tools.cc @@ -248,7 +248,7 @@ thread_local bool is_asio_thread = false; int rgw_rados_operate(librados::IoCtx& ioctx, const std::string& oid, librados::ObjectReadOperation *op, bufferlist* pbl, - optional_yield y) + optional_yield y, int flags) { #ifdef HAVE_BOOST_CONTEXT // given a yield_context, call async_operate() to yield the coroutine instead @@ -257,7 +257,8 @@ int rgw_rados_operate(librados::IoCtx& ioctx, const std::string& oid, auto& context = y.get_io_context(); auto& yield = y.get_yield_context(); boost::system::error_code ec; - auto bl = librados::async_operate(context, ioctx, oid, op, 0, yield[ec]); + auto bl = librados::async_operate( + context, ioctx, oid, op, flags, yield[ec]); if (pbl) { *pbl = std::move(bl); } @@ -268,25 +269,26 @@ int rgw_rados_operate(librados::IoCtx& ioctx, const std::string& oid, dout(20) << "WARNING: blocking librados call" << dendl; } #endif - return ioctx.operate(oid, op, nullptr); + return ioctx.operate(oid, op, nullptr, flags); } int rgw_rados_operate(librados::IoCtx& ioctx, const std::string& oid, - librados::ObjectWriteOperation *op, optional_yield y) + librados::ObjectWriteOperation *op, optional_yield y, + int flags) { #ifdef HAVE_BOOST_CONTEXT if (y) { auto& context = y.get_io_context(); auto& yield = y.get_yield_context(); boost::system::error_code ec; - librados::async_operate(context, ioctx, oid, op, 0, yield[ec]); + librados::async_operate(context, ioctx, oid, op, flags, yield[ec]); return -ec.value(); } if (is_asio_thread) { dout(20) << "WARNING: blocking librados call" << dendl; } #endif - return ioctx.operate(oid, op); + return ioctx.operate(oid, op, flags); } int rgw_rados_notify(librados::IoCtx& ioctx, const std::string& oid,