]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
blk/pmem: Add namespace std for map,string 42825/head
authorFeng Hualong <hualong.feng@intel.com>
Wed, 18 Aug 2021 05:52:50 +0000 (13:52 +0800)
committerFeng Hualong <hualong.feng@intel.com>
Wed, 18 Aug 2021 05:52:50 +0000 (13:52 +0800)
Due to not use namespace std for map,string, it leads to
`map,string` not be declared.

Signed-off-by: Feng Hualong <hualong.feng@intel.com>
src/blk/pmem/PMEMDevice.cc
src/blk/pmem/PMEMDevice.h

index 247ed0692ed82ff6702464a1468f157319d0ca61..c410c584538c6a62877497d51be4f64cf66fd6b9 100644 (file)
@@ -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<string,string> *pm) const
+int PMEMDevice::collect_metadata(const std::string& prefix, std::map<std::string,std::string> *pm) const
 {
   (*pm)[prefix + "rotational"] = stringify((int)(bool)rotational);
   (*pm)[prefix + "size"] = stringify(get_size());
index a240d2a7b31446c3a296f04d68331c1d5285536f..4613d7dbc57bd5be38618147ac868e920080112a 100644 (file)
@@ -18,6 +18,8 @@
 #define CEPH_BLK_PMEMDEVICE_H
 
 #include <atomic>
+#include <map>
+#include <string>
 
 #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<std::string,std::string> *pm) const override;
+  int collect_metadata(const std::string& prefix, std::map<std::string,std::string> *pm) const override;
 
   static bool support(const std::string& path);