diff options
author | Adam Kupczyk <akupczyk@ibm.com> | 2024-09-12 12:43:40 +0200 |
---|---|---|
committer | Adam Kupczyk <akupczyk@ibm.com> | 2024-09-12 12:43:40 +0200 |
commit | 1b431a3757e7f27224a5267722e07188fa191d53 (patch) | |
tree | 32c176dbacaa137e6eb62419962912b46f1839ac | |
parent | tool/bluestore-tool: add zap_device command support (diff) | |
download | ceph-1b431a3757e7f27224a5267722e07188fa191d53.tar.xz ceph-1b431a3757e7f27224a5267722e07188fa191d53.zip |
tools/ceph-bluestore-tool: Allow show-label even if OSD is running
ceph-volume needs to query the devices for `ceph-volume raw list`.
Signed-off-by: Adam Kupczyk <akupczyk@ibm.com>
-rw-r--r-- | src/os/bluestore/BlueStore.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 0adab146c84..3cc7f71b31f 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -6928,6 +6928,10 @@ int BlueStore::read_bdev_label( { unique_ptr<BlockDevice> bdev(BlockDevice::create( cct, path, nullptr, nullptr, nullptr, nullptr)); + if (!bdev) { + return -EIO; + } + bdev->set_no_exclusive_lock(); int r = bdev->open(path); if (r < 0) return r; |