mirror of
https://github.com/ceph/ceph
synced 2024-12-17 00:46:05 +00:00
FileStore: Conditional collection of drive metadata
get_device_by_uuid->blkid_find_dev_with_tag() call from FileStore::collect_metadata() is hanging for ~3min before returning EINVAL in case the drive is visible but reserved for some other host. This is probably is bug within blkid* calls. fdisk/lsblk call is coming out immediately saying device is inaccessible. This call is now protected by config option filestore_collect_device_partition_information Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
This commit is contained in:
parent
fbd5959fc9
commit
3296905f95
@ -903,6 +903,8 @@ OPTION(filestore_fsync_flushes_journal_data, OPT_BOOL, false)
|
||||
OPTION(filestore_fiemap, OPT_BOOL, false) // (try to) use fiemap
|
||||
OPTION(filestore_seek_data_hole, OPT_BOOL, false) // (try to) use seek_data/hole
|
||||
OPTION(filestore_fadvise, OPT_BOOL, true)
|
||||
//collect device partition information for management application to use
|
||||
OPTION(filestore_collect_device_partition_information, OPT_BOOL, true)
|
||||
|
||||
// (try to) use extsize for alloc hint NOTE: extsize seems to trigger
|
||||
// data corruption in xfs prior to kernel 3.5. filestore will
|
||||
|
@ -674,8 +674,12 @@ void FileStore::collect_metadata(map<string,string> *pm)
|
||||
ss << "0x" << std::hex << m_fs_type << std::dec;
|
||||
(*pm)["filestore_f_type"] = ss.str();
|
||||
|
||||
rc = get_device_by_uuid(get_fsid(), "PARTUUID", partition_path,
|
||||
dev_node);
|
||||
if (g_conf->filestore_collect_device_partition_information) {
|
||||
rc = get_device_by_uuid(get_fsid(), "PARTUUID", partition_path,
|
||||
dev_node);
|
||||
} else {
|
||||
rc = -EINVAL;
|
||||
}
|
||||
|
||||
switch (rc) {
|
||||
case -EOPNOTSUPP:
|
||||
|
Loading…
Reference in New Issue
Block a user