]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore/KernelDevice: advertise vdo and physical_size in metadata
authorSage Weil <sage@redhat.com>
Wed, 21 Feb 2018 17:46:11 +0000 (11:46 -0600)
committerSage Weil <sage@redhat.com>
Mon, 2 Apr 2018 20:19:19 +0000 (15:19 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/os/bluestore/KernelDevice.cc

index bbd1a0badb87e3bab8d4ab4a591a26fb5c0f30a4..c1213a5fd6fb37fc1a323ba5cdeec7ee0e2b8773 100644 (file)
@@ -228,6 +228,12 @@ int KernelDevice::collect_metadata(const string& prefix, map<string,string> *pm)
   } else {
     (*pm)[prefix + "type"] = "ssd";
   }
+  if (vdo_fd >= 0) {
+    (*pm)[prefix + "vdo"] = "true";
+    uint64_t total, avail;
+    get_vdo_utilization(vdo_fd, &total, &avail);
+    (*pm)[prefix + "vdo_physical_size"] = stringify(total);
+  }
 
   struct stat st;
   int r = ::fstat(fd_buffered, &st);