Changeset View
Changeset View
Standalone View
Standalone View
net/ceph/files/patch-src_tools_ceph__kvstore__tool.cc
--- src/tools/ceph_kvstore_tool.cc.orig 2017-11-30 14:59:27 UTC | --- src/tools/ceph_kvstore_tool.cc.orig 2018-02-26 21:47:18 UTC | ||||
+++ src/tools/ceph_kvstore_tool.cc | +++ src/tools/ceph_kvstore_tool.cc | ||||
@@ -36,11 +36,13 @@ using namespace std; | @@ -36,7 +36,9 @@ using namespace std; | ||||
class StoreTool | class StoreTool | ||||
{ | { | ||||
+#ifdef HAVE_LIBAIO | +#ifdef HAVE_LIBAIO | ||||
boost::scoped_ptr<BlueStore> bluestore; | boost::scoped_ptr<BlueStore> bluestore; | ||||
+#endif | +#endif | ||||
// TODO: make KeyValueDB enable_shared_from_this | // TODO: make KeyValueDB enable_shared_from_this | ||||
// bluestore will hold *db* also, use unique_ptr/shared_ptr will | // bluestore will hold *db* also, use unique_ptr/shared_ptr will | ||||
// double free. | |||||
KeyValueDB* db; | |||||
string store_path; | |||||
@@ -74,10 +76,13 @@ class StoreTool | @@ -74,10 +76,13 @@ class StoreTool | ||||
} | } | ||||
~StoreTool() { | ~StoreTool() { | ||||
+#ifdef HAVE_LIBAIO | +#ifdef HAVE_LIBAIO | ||||
if (bluestore) { | if (bluestore) { | ||||
bluestore->umount(); | bluestore->umount(); | ||||
} | } | ||||
- else { | - else { | ||||
+ else | + else | ||||
+#endif | +#endif | ||||
+ { | + { | ||||
if (db) { | if (db) { | ||||
delete db; | delete db; | ||||
} | } |