]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
crimson/osd: use a unified super-block for devices
authorRonen Friedman <rfriedma@redhat.com>
Mon, 9 Mar 2026 17:23:18 +0000 (17:23 +0000)
committerRonen Friedman <rfriedma@redhat.com>
Fri, 24 Apr 2026 08:16:22 +0000 (08:16 +0000)
commit97dcba15eb506b0cede1f5a3e5d467e1ffe1d541
tree8ae85f6ad15ce46832455af9db93716a1a0209a5
parent427c845cdf398bbcef91adad9a12e51751ee6cb5
crimson/osd: use a unified super-block for devices

This commit refactors the on-hardware super-block structure
used by the seastore to a unified format that
can accommodate all three device types (HDD, ZBD, RBM).

All devices now have a 60 bytes header at address 0,
similar to the existing BlueStore layout. A 23-byte magic
string ("CRIMSON_DEVICE") is placed at the beginning of
the header, followed by 37 bytes of null padding (to
match the existing 60 bytes of the super-block), and
then the DENC-encoded device_superblock_t structure starting
at offset 60.

A unified device_config_t is now used for all device types.

The per-shard data structure is also unified, now including a union
of all relevant fields for each device type.

We are also adding a check for the super-block magic value in the
RBMDevice::read_rbm_superblock() method, similar to the existing check
in SegmentManager::read_segment_manager_superblock().

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
15 files changed:
src/crimson/os/seastore/device.cc
src/crimson/os/seastore/device.h
src/crimson/os/seastore/random_block_manager.h
src/crimson/os/seastore/random_block_manager/block_rb_manager.cc
src/crimson/os/seastore/random_block_manager/block_rb_manager.h
src/crimson/os/seastore/random_block_manager/rbm_device.cc
src/crimson/os/seastore/random_block_manager/rbm_device.h
src/crimson/os/seastore/seastore_types.h
src/crimson/os/seastore/segment_manager.cc
src/crimson/os/seastore/segment_manager.h
src/crimson/os/seastore/segment_manager/block.cc
src/crimson/os/seastore/segment_manager/block.h
src/crimson/os/seastore/segment_manager/zbd.cc
src/crimson/os/seastore/segment_manager/zbd.h
src/crimson/tools/objectstore/crimson_objectstore_tool.cc