Otherwise, all you see is errors about the probes that failed (e.g., a
failure to decode a non-bluestore superblock as bluestore).
Signed-off-by: Sage Weil <sage@redhat.com>
}
if (get_device_fsid) {
uuid_d uuid;
- int r = ObjectStore::probe_block_device_fsid(device_path, &uuid);
+ int r = ObjectStore::probe_block_device_fsid(g_ceph_context, device_path,
+ &uuid);
if (r < 0) {
cerr << "failed to get device fsid for " << device_path
<< ": " << cpp_strerror(r) << std::endl;
}
int ObjectStore::probe_block_device_fsid(
+ CephContext *cct,
const string& path,
uuid_d *fsid)
{
// first try bluestore -- it has a crc on its header and will fail
// reliably.
r = BlueStore::get_block_device_fsid(path, fsid);
- if (r == 0)
+ if (r == 0) {
+ lgeneric_dout(cct, 0) << __func__ << " " << path << " is bluestore, "
+ << *fsid << dendl;
return r;
+ }
#endif
// okay, try FileStore (journal).
r = FileStore::get_block_device_fsid(path, fsid);
- if (r == 0)
+ if (r == 0) {
+ lgeneric_dout(cct, 0) << __func__ << " " << path << " is filestore, "
+ << *fsid << dendl;
return r;
+ }
return -EINVAL;
}
* @param path path to device
* @param fsid [out] osd uuid
*/
- static int probe_block_device_fsid(const string& path,
- uuid_d *fsid);
+ static int probe_block_device_fsid(
+ CephContext *cct,
+ const string& path,
+ uuid_d *fsid);
Logger *logger;