]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd: fix signatures of get_store_errors() and friends 37598/head
authorRonen Friedman <rfriedma@redhat.com>
Thu, 8 Oct 2020 12:35:35 +0000 (15:35 +0300)
committerRonen Friedman <rfriedma@redhat.com>
Wed, 28 Oct 2020 15:40:57 +0000 (17:40 +0200)
commit37a6c4057d367728ace74db6ce3f45e7a707a24a
tree8c31d14695641591db0389f38ebc1243bd00c038
parent699c2740fee4aa8f4d431fc313d25ac6cb444202
osd: fix signatures of get_store_errors() and friends

The 'store' parameter was ignored by ScrubStore-related get_*_errors()
functions, and is now removed.

The functions are now marked 'const'. That required tagging the caching
member Store::backend as 'mutable'. While 'mutable' is an 'eyesore',
here is one of the rare cases where its use is justified. Following
https://isocpp.org/wiki/faq/const-correctness:
"When methods change the physical but not logical state, the method should
generally be marked as const since it really is an inspector-method."
(The text then continues and specifically prescribes 'mutable' for these situations.)

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
src/osd/PrimaryLogPG.cc
src/osd/ScrubStore.cc
src/osd/ScrubStore.h