From: Sage Weil Date: Tue, 8 Aug 2017 17:59:41 +0000 (-0400) Subject: os/filestore: fix device/partition metadata detection X-Git-Tag: ses5-gm~5^2~1^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4c9d86bd86954cbee25a3ea2a60af063114f7790;p=ceph.git os/filestore: fix device/partition metadata detection 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 (cherry picked from commit e62862be0b68a17763e19ed8453436c457294505) --- diff --git a/src/os/filestore/FileStore.cc b/src/os/filestore/FileStore.cc index b097a3c18a61..caac76ec4140 100644 --- a/src/os/filestore/FileStore.cc +++ b/src/os/filestore/FileStore.cc @@ -687,8 +687,7 @@ void FileStore::collect_metadata(map *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; }