From: Matt Benjamin Date: Fri, 10 Feb 2017 22:14:16 +0000 (-0500) Subject: rgw_file: add pretty-print for RGWFileHandle X-Git-Tag: v12.0.1~423^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ef330f385d3407af5f470b5093145f59cc4dcc79;p=ceph.git rgw_file: add pretty-print for RGWFileHandle Signed-off-by: Matt Benjamin --- diff --git a/src/rgw/rgw_file.cc b/src/rgw/rgw_file.cc index 2abe76b483c..d7076d30528 100644 --- a/src/rgw/rgw_file.cc +++ b/src/rgw/rgw_file.cc @@ -720,6 +720,31 @@ namespace rgw { } while (! (stop || shutdown)); } /* RGWLibFS::gc */ + std::ostream& operator<<(std::ostream &os, + RGWFileHandle const &rgw_fh) + { + const auto& fhk = rgw_fh.get_key(); + const auto& fh = const_cast(rgw_fh).get_fh(); + os << ""; + return os; + } + RGWFileHandle::~RGWFileHandle() { if (parent && (! parent->is_root())) { /* safe because if parent->unref causes its deletion, diff --git a/src/rgw/rgw_file.h b/src/rgw/rgw_file.h index 9cc55ac0b94..e0f9b627410 100644 --- a/src/rgw/rgw_file.h +++ b/src/rgw/rgw_file.h @@ -642,6 +642,9 @@ namespace rgw { virtual ~RGWFileHandle(); + friend std::ostream& operator<<(std::ostream &os, + RGWFileHandle const &rgw_fh); + class Factory : public cohort::lru::ObjectFactory { public: