Skip to content

Commit

Permalink
Merge pull request #6956 from somnathr/wip-conditional-drive-metadata…
Browse files Browse the repository at this point in the history
…-collection

osd: FileStore: conditional collection of drive metadata

Reviewed-by: Sage Weil <sage@redhat.com>
  • Loading branch information
liewegas committed Dec 17, 2015
2 parents cf5da01 + 3296905 commit 03f9c6f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/common/config_opts.h
Expand Up @@ -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
Expand Down
8 changes: 6 additions & 2 deletions src/os/FileStore.cc
Expand Up @@ -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:
Expand Down

0 comments on commit 03f9c6f

Please sign in to comment.