From: Feng Hualong Date: Wed, 18 Aug 2021 05:52:50 +0000 (+0800) Subject: blk/pmem: Add namespace std for map,string X-Git-Tag: v17.1.0~1081^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F42825%2Fhead;p=ceph.git blk/pmem: Add namespace std for map,string Due to not use namespace std for map,string, it leads to `map,string` not be declared. Signed-off-by: Feng Hualong --- diff --git a/src/blk/pmem/PMEMDevice.cc b/src/blk/pmem/PMEMDevice.cc index 247ed0692ed8..c410c584538c 100644 --- a/src/blk/pmem/PMEMDevice.cc +++ b/src/blk/pmem/PMEMDevice.cc @@ -54,7 +54,7 @@ int PMEMDevice::_lock() return 0; } -int PMEMDevice::open(const string& p) +int PMEMDevice::open(const std::string& p) { path = p; int r = 0; @@ -128,7 +128,7 @@ void PMEMDevice::close() path.clear(); } -int PMEMDevice::collect_metadata(const string& prefix, map *pm) const +int PMEMDevice::collect_metadata(const std::string& prefix, std::map *pm) const { (*pm)[prefix + "rotational"] = stringify((int)(bool)rotational); (*pm)[prefix + "size"] = stringify(get_size()); diff --git a/src/blk/pmem/PMEMDevice.h b/src/blk/pmem/PMEMDevice.h index a240d2a7b314..4613d7dbc57b 100644 --- a/src/blk/pmem/PMEMDevice.h +++ b/src/blk/pmem/PMEMDevice.h @@ -18,6 +18,8 @@ #define CEPH_BLK_PMEMDEVICE_H #include +#include +#include #include "os/fs/FS.h" #include "include/interval_set.h" @@ -41,7 +43,7 @@ public: void aio_submit(IOContext *ioc) override; - int collect_metadata(const std::string& prefix, map *pm) const override; + int collect_metadata(const std::string& prefix, std::map *pm) const override; static bool support(const std::string& path);