]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
crimson/osd: use store-specific max_object_size for the OSD-layer write check 69018/head
authorKefu Chai <k.chai@proxmox.com>
Wed, 20 May 2026 07:55:58 +0000 (15:55 +0800)
committerKefu Chai <k.chai@proxmox.com>
Wed, 20 May 2026 11:59:38 +0000 (19:59 +0800)
commit9f8642bbd63bfaf4b4e3599692dab6bd9cbc73f6
treea6c44569368d8f554ae84bc4b5d18db36edd8358
parentb83a20a2fc28a8cf1c7bfbff799e14b583634c89
crimson/osd: use store-specific max_object_size for the OSD-layer write check

is_offset_and_length_valid() checked write sizes against
osd_max_object_size (128 MiB), but SeaStore caps per-onode laddr space
at seastore_default_max_object_size (16 MiB).  Writes between the two
limits pass the OSD check, reach SeaStore, and trip
prepare_data_reservation()'s ceph_assert(), crashing the OSD and its
replicas.

Add FuturizedStore::Shard::get_max_object_size() (returns
osd_max_object_size by default) and override it in SeaStore::Shard to
return min(osd_max_object_size, max_object_size).  Convert
is_offset_and_length_valid() from a static function to a PGBackend
member that queries the store, so EFBIG reaches the client before the
write ever hits the store.

Signed-off-by: Kefu Chai <k.chai@proxmox.com>
src/crimson/os/futurized_store.h
src/crimson/os/seastore/seastore.h
src/crimson/osd/pg_backend.cc
src/crimson/osd/pg_backend.h