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>
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
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: