From: Max Kellermann Date: Thu, 24 Apr 2025 12:17:03 +0000 (+0200) Subject: include/fs_types: un-inline operator<<(inodeno_t) X-Git-Tag: v21.0.0~256^2~78^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4d7941f93a64811ab7162f50cc98e8343c1b2fb8;p=ceph.git include/fs_types: un-inline operator<<(inodeno_t) Allows switching to `iosfwd`. Signed-off-by: Max Kellermann --- diff --git a/src/common/fs_types.cc b/src/common/fs_types.cc index e1334249a309..1639a9313d16 100644 --- a/src/common/fs_types.cc +++ b/src/common/fs_types.cc @@ -7,10 +7,16 @@ #include "common/ceph_json.h" #include "include/denc.h" +#include + void inodeno_t::dump(ceph::Formatter *f) const { f->dump_unsigned("val", val); } +std::ostream& operator<<(std::ostream& out, const inodeno_t& ino) { + return out << std::hex << "0x" << ino.val << std::dec; +} + void dump(const ceph_file_layout& l, ceph::Formatter *f) { f->dump_unsigned("stripe_unit", l.fl_stripe_unit); diff --git a/src/include/fs_types.h b/src/include/fs_types.h index 65780293a54a..86d44d2eaef1 100644 --- a/src/include/fs_types.h +++ b/src/include/fs_types.h @@ -5,7 +5,7 @@ #include #include -#include +#include #include #include "include/buffer.h" @@ -70,9 +70,7 @@ struct denc_traits { } }; -inline std::ostream& operator<<(std::ostream& out, const inodeno_t& ino) { - return out << std::hex << "0x" << ino.val << std::dec; -} +std::ostream& operator<<(std::ostream& out, const inodeno_t& ino); namespace std { template<>