]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore: use default value for non-decoded field in test instances 63935/head
authorKefu Chai <tchaikov@gmail.com>
Sun, 15 Jun 2025 05:40:10 +0000 (13:40 +0800)
committerKefu Chai <tchaikov@gmail.com>
Mon, 23 Jun 2025 14:02:42 +0000 (22:02 +0800)
commit2426c112ae02b2ffd05016ba76bb6513efec2c92
treed667b14130c87871effb234f668231dc42422727
parenta6680402cbbc8a8121961cd5a8f542f930346b14
os/bluestore: use default value for non-decoded field in test instances

The sbid field added in commit a7f8e231 is set during construction
but not persisted to disk. Including it in dump() output causes
discrepancies between original and re-encoded instances, leading
to test failures in readable.sh and check-generated.sh.

Current tests pass because they reuse the same instance for
re-encoding, preserving non-persisted fields. An upcoming change
will allocate fresh instances for each decode operation, which
will expose this issue and break tests.

Use default value for sbid when generating test instances to ensure
consistency between encoding and decoding operations.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
src/os/bluestore/bluestore_types.cc