From: Jianpeng Ma Date: Wed, 27 Jun 2018 10:04:44 +0000 (+0800) Subject: test/fio: fix compiler error. X-Git-Tag: v14.0.1~1008^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F22728%2Fhead;p=ceph.git test/fio: fix compiler error. 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 --- diff --git a/src/test/fio/fio_ceph_objectstore.cc b/src/test/fio/fio_ceph_objectstore.cc index 1d63e47d61e3..8f092d40affa 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;