From: Adam Kupczyk Date: Tue, 30 Jan 2024 17:45:14 +0000 (+0000) Subject: os/bluestore: Small fix to check_or_set_bdev_label X-Git-Tag: v19.2.1~271^2~29 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ad9571aa839d7d423412e4571fa8517ba628f8b6;p=ceph.git os/bluestore: Small fix to check_or_set_bdev_label Signed-off-by: Adam Kupczyk (cherry picked from commit 7e1d04345d96fde9cdece2a7339d8705ea0805f1) --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index c5d3a8b41d45..4790732f6c28 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -6759,7 +6759,7 @@ void BlueStore::_main_bdev_label_remove(Allocator* an_alloc) } int BlueStore::_check_or_set_bdev_label( - string path, uint64_t size, string desc, bool create) + const string& path, uint64_t size, string desc, bool create) { bluestore_bdev_label_t label; if (create) { @@ -6787,7 +6787,7 @@ int BlueStore::_check_or_set_bdev_label( } int BlueStore::_check_or_set_main_bdev_label( - string path, uint64_t size, bool create) + const string& path, uint64_t size, bool create) { if (create) { bdev_label_valid_locations.clear(); diff --git a/src/os/bluestore/BlueStore.h b/src/os/bluestore/BlueStore.h index 89bf2a2b9ef9..b27e2e817731 100644 --- a/src/os/bluestore/BlueStore.h +++ b/src/os/bluestore/BlueStore.h @@ -2775,10 +2775,10 @@ public: CephContext* cct, const std::string &path, bluestore_bdev_label_t *label, uint64_t disk_position = BDEV_LABEL_POSITION); private: - int _check_or_set_bdev_label(std::string path, uint64_t size, std::string desc, + int _check_or_set_bdev_label(const std::string& path, uint64_t size, std::string desc, bool create); int _check_or_set_main_bdev_label( - std::string path, + const std::string& path, uint64_t size, bool create); static int _read_main_bdev_label(