From: dingdangzhang Date: Wed, 26 Jul 2017 12:05:01 +0000 (+0800) Subject: bluestore/BlueFS: pass string as const ref X-Git-Tag: v12.1.2~88^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F16600%2Fhead;p=ceph.git bluestore/BlueFS: pass string as const ref Signed-off-by: dingdangzhang --- diff --git a/src/os/bluestore/BlueFS.cc b/src/os/bluestore/BlueFS.cc index 36f0b3cb04987..ed94e60067c23 100644 --- a/src/os/bluestore/BlueFS.cc +++ b/src/os/bluestore/BlueFS.cc @@ -129,7 +129,7 @@ void BlueFS::_update_logger_stats() } } -int BlueFS::add_block_device(unsigned id, string path) +int BlueFS::add_block_device(unsigned id, const string& path) { dout(10) << __func__ << " bdev " << id << " path " << path << dendl; assert(id < bdev.size()); diff --git a/src/os/bluestore/BlueFS.h b/src/os/bluestore/BlueFS.h index 7229355a10dfe..bb14ffc3697d0 100644 --- a/src/os/bluestore/BlueFS.h +++ b/src/os/bluestore/BlueFS.h @@ -384,7 +384,7 @@ public: /// sync any uncommitted state to disk void sync_metadata(); - int add_block_device(unsigned bdev, string path); + int add_block_device(unsigned bdev, const string& path); bool bdev_support_label(unsigned id); uint64_t get_block_device_size(unsigned bdev);