From 3a3d020d3376b3d41cdc3595e655f715c86ee2b2 Mon Sep 17 00:00:00 2001 From: Ziye Yang Date: Tue, 11 Apr 2017 18:31:36 +0800 Subject: [PATCH] bluestore/NVMEDevice: fix the compilation issue for collect_metadata Signed-off-by: optimistyzy --- src/os/bluestore/NVMEDevice.cc | 4 +++- src/os/bluestore/NVMEDevice.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/os/bluestore/NVMEDevice.cc b/src/os/bluestore/NVMEDevice.cc index 354036ff0aa18..ef27b8d2ab4f9 100644 --- a/src/os/bluestore/NVMEDevice.cc +++ b/src/os/bluestore/NVMEDevice.cc @@ -890,7 +890,7 @@ void NVMEDevice::close() dout(1) << __func__ << " end" << dendl; } -void NVMEDevice::collect_metadata(map *pm) +int NVMEDevice::collect_metadata(string prefix, map *pm) const { (*pm)[prefix + "rotational"] = "0"; (*pm)[prefix + "size"] = stringify(get_size()); @@ -899,6 +899,8 @@ void NVMEDevice::collect_metadata(map *pm) (*pm)[prefix + "type"] = "nvme"; (*pm)[prefix + "access_mode"] = "spdk"; (*pm)[prefix + "nvme_serial_number"] = name; + + return 0; } int NVMEDevice::flush() diff --git a/src/os/bluestore/NVMEDevice.h b/src/os/bluestore/NVMEDevice.h index 42f4090cba54b..318c3415a949e 100644 --- a/src/os/bluestore/NVMEDevice.h +++ b/src/os/bluestore/NVMEDevice.h @@ -236,7 +236,7 @@ class NVMEDevice : public BlockDevice { int invalidate_cache(uint64_t off, uint64_t len) override; int open(const string& path) override; void close() override; - void collect_metadata(map *pm) override; + int collect_metadata(string prefix, map *pm) const override; }; #endif -- 2.39.5