uint32_t op_flags = 0) = 0;
virtual unsigned get_max_attr_name_length() const = 0;
-
- /// Override to report a tighter per-object cap than osd_max_object_size.
- virtual uint64_t get_max_object_size() const {
- return crimson::common::local_conf()->osd_max_object_size;
- }
};
public:
virtual uuid_d get_fsid() const = 0;
+ /// Override to report a tighter per-object cap than osd_max_object_size.
+ virtual uint64_t get_max_object_size() const {
+ return crimson::common::local_conf()->osd_max_object_size;
+ }
+
virtual seastar::future<> write_meta(const std::string& key,
const std::string& value) = 0;
return 256;
}
- uint64_t get_max_object_size() const override final {
- return std::min<uint64_t>(
- crimson::common::local_conf()->osd_max_object_size,
- max_object_size);
- }
-
omap_root_t select_log_omap_root(Onode& onode) const;
// only exposed to SeaStore
return shard_stores.local().mshard_stores[0]->get_fsid();
}
+ uint64_t get_max_object_size() const override final {
+ return std::min<uint64_t>(
+ crimson::common::local_conf()->osd_max_object_size,
+ crimson::common::get_conf<uint64_t>("seastore_default_max_object_size"));
+ }
+
seastar::future<> write_meta(const std::string& key, const std::string& value) override;
seastar::future<std::tuple<int, std::string>> read_meta(const std::string& key) override;
assert(shard_store.get_status() == true);
return shard_store;
}
+
static col_obj_ranges_t
get_objs_range(CollectionRef ch, unsigned bits);
}
bool PGBackend::is_offset_and_length_valid(
- const std::uint64_t offset,
- const std::uint64_t length) const
+ const std::uint64_t offset,
+ const std::uint64_t length) const
{
- if (const std::uint64_t max =
- store.f_store.get_sharded_store(store.store_index).get_max_object_size();
+ if (const std::uint64_t max = store.f_store.get_max_object_size();
offset >= max || length > max || offset + length > max) {
logger().debug("{} max_object_size: {}, offset: {}, len: {}; "
- "Hard limit of object size is 4GB",
- __func__, max, offset, length);
+ "Hard limit of object size is 4GB",
+ __func__, max, offset, length);
return false;
} else {
return true;