]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
os/bluestore/BlueFS: Reduce unnecessary operations in collect_metadata
authorLuo Kexue <luo.kexue@zte.com.cn>
Wed, 27 Sep 2017 14:40:00 +0000 (22:40 +0800)
committerLuo Kexue <luo.kexue@zte.com.cn>
Thu, 26 Oct 2017 12:48:42 +0000 (20:48 +0800)
Signed-off-by: Luo Kexue <luo.kexue@zte.com.cn>
src/os/bluestore/BlueFS.cc
src/os/bluestore/BlueFS.h
src/os/bluestore/BlueStore.cc

index e3ffff2600fda6a50cd02af695ca79de6a4422bd..5c5caf57171cf6504e67816e5615bb538e4f373c 100644 (file)
@@ -456,14 +456,12 @@ void BlueFS::umount()
   _shutdown_logger();
 }
 
-void BlueFS::collect_metadata(map<string,string> *pm)
+void BlueFS::collect_metadata(map<string,string> *pm, unsigned skip_bdev_id)
 {
-  if (bdev[BDEV_DB])
+  if (skip_bdev_id != BDEV_DB && bdev[BDEV_DB])
     bdev[BDEV_DB]->collect_metadata("bluefs_db_", pm);
   if (bdev[BDEV_WAL])
     bdev[BDEV_WAL]->collect_metadata("bluefs_wal_", pm);
-  if (bdev[BDEV_SLOW])
-    bdev[BDEV_SLOW]->collect_metadata("bluefs_slow_", pm);
 }
 
 int BlueFS::fsck()
index 36b41b451bbe5a66168e35794ee0033dd5c498f4..0947b18e6254481e8798eb48cc781439ee89eedb 100644 (file)
@@ -333,7 +333,7 @@ public:
   int mount();
   void umount();
 
-  void collect_metadata(map<string,string> *pm);
+  void collect_metadata(map<string,string> *pm, unsigned skip_bdev_id);
   int fsck();
 
   uint64_t get_fs_usage();
index aa1b3847c8e6299fa064c53f5e9248568a165a47..89659ec1c5515fdb5057f36904f1169d28fca37e 100644 (file)
@@ -6121,7 +6121,7 @@ void BlueStore::collect_metadata(map<string,string> *pm)
   if (bluefs) {
     (*pm)["bluefs"] = "1";
     (*pm)["bluefs_single_shared_device"] = stringify((int)bluefs_single_shared_device);
-    bluefs->collect_metadata(pm);
+    bluefs->collect_metadata(pm, bluefs_shared_bdev);
   } else {
     (*pm)["bluefs"] = "0";
   }