]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
NVMEDevice: use device name instead of path
authorHaomai Wang <haomai@xsky.com>
Mon, 4 Jan 2016 14:13:31 +0000 (22:13 +0800)
committerHaomai Wang <haomai@xsky.com>
Mon, 1 Feb 2016 14:00:42 +0000 (22:00 +0800)
Signed-off-by: Haomai Wang <haomai@xsky.com>
src/os/bluestore/NVMEDevice.cc
src/os/bluestore/NVMEDevice.h

index b212dbbb1bdaf81ef9538b35776d7a66f7c59bb3..7c70d6ef072807581a9be4301fbd6cb32ef7bd51 100644 (file)
@@ -60,7 +60,7 @@ static void io_complete(void *ctx, const struct nvme_completion *completion) {
 
 // ----------------
 #undef dout_prefix
-#define dout_prefix *_dout << "bdev(" << path << ") "
+#define dout_prefix *_dout << "bdev(" << name << ") "
 
 NVMEDevice::NVMEDevice(aio_callback_t cb, void *cbpriv)
     : aio_queue(g_conf->bdev_aio_max_queue_depth),
@@ -217,6 +217,7 @@ int NVMEDevice::open(string p)
   assert(r == 0);
   r = _aio_start();
   assert(r == 0);
+  name = pci_device_get_device_name(pci_dev);
   return 0;
 }
 
index 74926c77c60cd3f368b9ae56c3801d56de6c7eb7..da6bcb2a8a8bad674aada2c886c047ee9db05f24 100644 (file)
@@ -34,6 +34,7 @@ class NVMEDevice : public BlockDevice {
   nvme_namespace       *ns;
        uint64_t blocklen;
   int unbindfromkernel = 0;
+  string name;
 
   uint64_t size;
   uint64_t block_size;