Skip to content

Commit

Permalink
Merge pull request #9734 from xiexingguo/xxg-wip-cleanup-omap
Browse files Browse the repository at this point in the history
os/filestore: add sanity checks and cleanups for mount() process

Reviewed-by: Sage Weil <sage@redhat.com>
  • Loading branch information
yuriw committed Aug 1, 2016
2 parents e08022f + 55bfc0c commit ef97f93
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/os/filestore/FileStore.cc
Expand Up @@ -1624,9 +1624,14 @@ int FileStore::mount()
}

if (superblock.omap_backend == "rocksdb")
omap_store->init(g_conf->filestore_rocksdb_options);
ret = omap_store->init(g_conf->filestore_rocksdb_options);
else
omap_store->init();
ret = omap_store->init();

if (ret < 0) {
derr << "Error initializing omap_store: " << cpp_strerror(ret) << dendl;
goto close_current_fd;
}

stringstream err;
if (omap_store->create_and_open(err)) {
Expand Down Expand Up @@ -1795,6 +1800,9 @@ int FileStore::mount()
fsid_fd = -1;
done:
assert(!m_filestore_fail_eio || ret != -EIO);
delete backend;
backend = NULL;
object_map.reset();
return ret;
}

Expand Down

0 comments on commit ef97f93

Please sign in to comment.