return true;
}
+auto RGWObjManifest::obj_find_part(const DoutPrefixProvider *dpp,
+ int part_num) const
+ -> obj_iterator
+{
+ const obj_iterator end = obj_end(dpp);
+ if (end.get_cur_part_id() == 0) { // not mulitipart
+ return end;
+ }
+
+ // linear search over parts/stripes
+ for (obj_iterator i = obj_begin(dpp); i != end; ++i) {
+ if (i.get_cur_part_id() == part_num) {
+ return i;
+ }
+ if (i.get_cur_part_id() > part_num) {
+ return end;
+ }
+ }
+ return end;
+}
+
int RGWObjManifest::generator::create_begin(CephContext *cct, RGWObjManifest *_m,
const rgw_placement_rule& head_placement_rule,
const rgw_placement_rule *tail_placement_rule,
#pragma once
+#include <optional>
#include "rgw_zone_types.h"
#include "rgw_bucket_types.h"
#include "rgw_obj_types.h"
}
}
+ std::optional<rgw_obj> get_head_obj() const {
+ if (is_raw) {
+ return std::nullopt;
+ } else {
+ return obj;
+ }
+ }
+
rgw_raw_obj get_raw_obj(const RGWZoneGroup& zonegroup, const RGWZoneParams& zone_params) const;
rgw_raw_obj get_raw_obj(RGWRados* store) const;
return ofs;
}
+ const std::string& get_cur_override_prefix() const {
+ return cur_override_prefix;
+ }
+
int get_cur_part_id() const {
return cur_part_id;
}
obj_iterator obj_find(const DoutPrefixProvider *dpp, uint64_t ofs) const {
return obj_iterator{dpp, this, std::min(ofs, obj_size)};
}
+ // return an iterator to the beginning of the given part number
+ obj_iterator obj_find_part(const DoutPrefixProvider *dpp, int part_num) const;
/*
* simple object generator. Using a simple single rule manifest.