From: Haomai Wang Date: Mon, 4 Jan 2016 14:13:31 +0000 (+0800) Subject: NVMEDevice: use device name instead of path X-Git-Tag: v10.0.4~81^2~49 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=415111ff9e1afbb7634a727ba92b3d11ae8e52cf;p=ceph.git NVMEDevice: use device name instead of path Signed-off-by: Haomai Wang --- diff --git a/src/os/bluestore/NVMEDevice.cc b/src/os/bluestore/NVMEDevice.cc index b212dbbb1bda..7c70d6ef0728 100644 --- a/src/os/bluestore/NVMEDevice.cc +++ b/src/os/bluestore/NVMEDevice.cc @@ -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; } diff --git a/src/os/bluestore/NVMEDevice.h b/src/os/bluestore/NVMEDevice.h index 74926c77c60c..da6bcb2a8a8b 100644 --- a/src/os/bluestore/NVMEDevice.h +++ b/src/os/bluestore/NVMEDevice.h @@ -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;