From 3fcd8290ba9bffa232560a5ca6ae59234a837c75 Mon Sep 17 00:00:00 2001 From: Jianpeng Ma Date: Wed, 27 Jun 2018 18:04:44 +0800 Subject: [PATCH] test/fio: fix compiler error. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Compile with -DWITH_FIO=ON, met the following bug. /home/ceph/src/test/fio/fio_ceph_objectstore.cc:148:9: error: ‘unique_ptr’ in namespace ‘ceph’ does not name a template type ceph::unique_ptr lock; ^~~~~~~~~~ /home/ceph/src/test/fio/fio_ceph_objectstore.cc: In constructor ‘{anonymous}::Collection::Collection(const spg_t&, ObjectStore::CollectionHandle)’: /home/ceph/src/test/fio/fio_ceph_objectstore.cc:158:9: error: class ‘{anonymous}::Collection’ does not have any field named ‘lock’ lock(new std::mutex) { ^~~~ /home/ceph/src/test/fio/fio_ceph_objectstore.cc: In function ‘fio_q_status {anonymous}::fio_ceph_os_queue(thread_data*, io_u*)’: /home/ceph/src/test/fio/fio_ceph_objectstore.cc:604:38: error: ‘struct {anonymous}::Collection’ has no member named ‘lock’ std::lock_guard l(*coll.lock); This bug introduct by commit da5d156b6bdffdd31e4edbadc1cdfc69197bef49. Signed-off-by: Jianpeng Ma --- src/test/fio/fio_ceph_objectstore.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/fio/fio_ceph_objectstore.cc b/src/test/fio/fio_ceph_objectstore.cc index 1d63e47d61e3f..8f092d40affa9 100644 --- a/src/test/fio/fio_ceph_objectstore.cc +++ b/src/test/fio/fio_ceph_objectstore.cc @@ -145,7 +145,7 @@ struct Collection { ObjectStore::CollectionHandle ch; // Can't use mutex directly in vectors hence dynamic allocation - ceph::unique_ptr lock; + std::unique_ptr lock; uint64_t pglog_ver_head = 1; uint64_t pglog_ver_tail = 1; uint64_t pglog_dup_ver_tail = 1; -- 2.39.5