]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/fio: fix compiler error. 22728/head
authorJianpeng Ma <jianpeng.ma@intel.com>
Wed, 27 Jun 2018 10:04:44 +0000 (18:04 +0800)
committerJianpeng Ma <jianpeng.ma@intel.com>
Wed, 27 Jun 2018 10:04:44 +0000 (18:04 +0800)
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<std::mutex> 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<std::mutex> l(*coll.lock);

This bug introduct by commit da5d156b6bdffdd31e4edbadc1cdfc69197bef49.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
src/test/fio/fio_ceph_objectstore.cc

index 1d63e47d61e3f0e5c2f24e7a45e043a488988e0e..8f092d40affa9d09118e81f7cb59eb61a37adc61 100644 (file)
@@ -145,7 +145,7 @@ struct Collection {
   ObjectStore::CollectionHandle ch;
   // Can't use mutex directly in vectors hence dynamic allocation
 
-  ceph::unique_ptr<std::mutex> lock;
+  std::unique_ptr<std::mutex> lock;
   uint64_t pglog_ver_head = 1;
   uint64_t pglog_ver_tail = 1;
   uint64_t pglog_dup_ver_tail = 1;