}
int RGWSI_RADOS::open_pool_ctx(const rgw_pool& pool, librados::IoCtx& io_ctx,
- ceph::optional_ref_default<OpenParams> params)
+ const OpenParams& params)
{
return rgw_init_ioctx(get_rados_handle(), pool, io_ctx,
- params->create,
- params->mostly_omap);
+ params.create,
+ params.mostly_omap);
}
int RGWSI_RADOS::pool_iterate(librados::IoCtx& io_ctx,
return 0;
}
-int RGWSI_RADOS::Pool::open(ceph::optional_ref_default<RGWSI_RADOS::OpenParams> params)
+int RGWSI_RADOS::Pool::open(const OpenParams& params)
{
- return rados_svc->open_pool_ctx(pool, state.ioctx);
+ return rados_svc->open_pool_ctx(pool, state.ioctx, params);
}
int RGWSI_RADOS::Pool::List::init(const string& marker, RGWAccessListFilter *filter)
#include "common/async/yield_context.h"
#include "common/RWLock.h"
-#include "common/optional_ref_default.h"
-
class RGWAsyncRadosProcessor;
class RGWAccessListFilter {
bool create{true};
bool mostly_omap{false};
+ OpenParams() {}
+
OpenParams& set_create(bool _create) {
create = _create;
return *this;
private:
librados::Rados* get_rados_handle();
int open_pool_ctx(const rgw_pool& pool, librados::IoCtx& io_ctx,
- ceph::optional_ref_default<OpenParams> params = std::nullopt);
+ const OpenParams& params = {});
int pool_iterate(librados::IoCtx& ioctx,
librados::NObjectIterator& iter,
uint32_t num, vector<rgw_bucket_dir_entry>& objs,
int create();
int create(const std::vector<rgw_pool>& pools, std::vector<int> *retcodes);
int lookup();
- int open(ceph::optional_ref_default<RGWSI_RADOS::OpenParams> params = std::nullopt);
+ int open(const OpenParams& params = {});
const rgw_pool& get_pool() {
return pool;