]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
crimson/os: specialize fmt::formatter<> for StagedIterator
authorKefu Chai <tchaikov@gmail.com>
Fri, 25 Nov 2022 09:00:11 +0000 (17:00 +0800)
committerKefu Chai <tchaikov@gmail.com>
Fri, 25 Nov 2022 13:20:58 +0000 (21:20 +0800)
commit71b9344f2995f2930a5d096fa2726f4858ad346e
tree96a6da09b077399e2f15c66f1b5e3eaa7c9fc27c
parent32e207da3f3888c1d1e9c835620d2c345f51671f
crimson/os: specialize fmt::formatter<> for StagedIterator

StagedIterator is a nested class of stage_t, which is in turn a template
class. it would be impossible to partial specialize fmt::formatter<> for
a nested class of a template class. to workaround this, we specialize
fmt::formatter<> for a type which has `do_format_to()` method, and
define this method for StagedIterator.

since seastar::logger is the only user of the operator<<() operator,
the original operator<<() operator is replaced with this new helper
method.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
src/crimson/os/seastore/object_data_handler.cc
src/crimson/os/seastore/onode_manager/staged-fltree/stages/stage.h