]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw: Ensure buckets too old to decode a layout have layout logs 43778/head
authorAdam C. Emerson <aemerson@redhat.com>
Tue, 2 Nov 2021 16:46:15 +0000 (12:46 -0400)
committerAdam C. Emerson <aemerson@redhat.com>
Wed, 3 Nov 2021 18:30:27 +0000 (14:30 -0400)
commit3279509127e65314c07963a3e127e926308bd76a
tree828d670661c64064a97613daa44f4dc92d8f9297
parent0b81879f3c132013067f766c4fb7d5508a97d6ee
rgw: Ensure buckets too old to decode a layout have layout logs

When decoding `RGWBucketInfo` data from before Pacific, we won't call
`rgw::BucketLayout::decode`, but will instead synthesize the layout
information. This leaves the `rgw::BucketLayout::logs` empty, as the
fallback to populate it only applies to old versions of
`rgw::BucketLayout`.

Add a check at the end of `RGWBUcketInfo::decode` to populate it if
empty.

Fixes: https://tracker.ceph.com/issues/53132
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
src/rgw/rgw_common.cc
src/rgw/rgw_dencoder.cc