From d092784098758fb538455aacd93fbd6b473dbffa Mon Sep 17 00:00:00 2001 From: dingdangzhang Date: Wed, 26 Jul 2017 20:05:01 +0800 Subject: [PATCH] bluestore/BlueFS: pass string as const ref Signed-off-by: dingdangzhang --- src/os/bluestore/BlueFS.cc | 2 +- src/os/bluestore/BlueFS.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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); -- 2.39.5