]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/filestore: fix device/partition metadata detection 17865/head
authorSage Weil <sage@redhat.com>
Tue, 8 Aug 2017 17:59:41 +0000 (13:59 -0400)
committerNathan Cutler <ncutler@suse.com>
Thu, 21 Sep 2017 04:07:11 +0000 (06:07 +0200)
The UUID thing (a) relies on partition labels to work, which isn't
always true (and won't be true for ceph-volume going forward), and
(b) reportedly doesn't work anyway.  The fd-based helper works
just fine (even for vstart).

Fixes: http://tracker.ceph.com/issues/20944
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit e62862be0b68a17763e19ed8453436c457294505)

src/os/filestore/FileStore.cc

index b097a3c18a61ba812932f636680b0470ebae1109..caac76ec41408127d8155f84dbdd5be294c7ad95 100644 (file)
@@ -687,8 +687,7 @@ void FileStore::collect_metadata(map<string,string> *pm)
   (*pm)["filestore_f_type"] = ss.str();
 
   if (cct->_conf->filestore_collect_device_partition_information) {
-    rc = get_device_by_uuid(get_fsid(), "PARTUUID", partition_path,
-          dev_node);
+    rc = get_device_by_fd(fsid_fd, partition_path, dev_node, PATH_MAX);
   } else {
     rc = -EINVAL;
   }