]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/filestore: advertise vdo in filestore metadata 20516/head
authorSage Weil <sage@redhat.com>
Wed, 21 Feb 2018 19:43:36 +0000 (13:43 -0600)
committerSage Weil <sage@redhat.com>
Mon, 2 Apr 2018 20:19:36 +0000 (15:19 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/os/filestore/FileStore.cc

index a1db3ab4c7f71cf9b449578252c15cb67bc73714..d88108ea97cc14e958900d0389292affe3fc749c 100644 (file)
@@ -707,6 +707,11 @@ void FileStore::collect_metadata(map<string,string> *pm)
     default:
       (*pm)["backend_filestore_partition_path"] = string(partition_path);
       (*pm)["backend_filestore_dev_node"] = string(dev_node);
+      if (vdo_fd >= 0) {
+       (*pm)["vdo"] = "true";
+       (*pm)["vdo_physical_size"] =
+         stringify(4096 * get_vdo_stat(vdo_fd, "physical_blocks"));
+      }
   }
 }