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:
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
}
}
-static bool is_offset_and_length_valid(
+bool PGBackend::is_offset_and_length_valid(
const std::uint64_t offset,
- const std::uint64_t length)
+ const std::uint64_t length) const
{
- if (const std::uint64_t max = local_conf()->osd_max_object_size;
+ if (const std::uint64_t max =
+ store.f_store.get_sharded_store(store.store_index).get_max_object_size();
offset >= max || length > max || offset + length > max) {
- logger().debug("{} osd_max_object_size: {}, offset: {}, len: {}; "
+ logger().debug("{} max_object_size: {}, offset: {}, len: {}; "
"Hard limit of object size is 4GB",
__func__, max, offset, length);
return false;
const hobject_t &oid);
private:
+ bool is_offset_and_length_valid(
+ std::uint64_t offset, std::uint64_t length) const;
+
virtual ll_read_ierrorator::future<ceph::bufferlist> _read(
const hobject_t& hoid,
size_t object_size,