From f865a81355612ab8b97a6157c7001945e15b5b12 Mon Sep 17 00:00:00 2001 From: Feng Hualong Date: Wed, 18 Aug 2021 13:52:50 +0800 Subject: [PATCH] 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 --- src/blk/pmem/PMEMDevice.cc | 4 ++-- src/blk/pmem/PMEMDevice.h | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/blk/pmem/PMEMDevice.cc b/src/blk/pmem/PMEMDevice.cc index 247ed0692ed..c410c584538 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 a240d2a7b31..4613d7dbc57 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); -- 2.39.5