From: David Zafman Date: Wed, 14 May 2014 22:37:17 +0000 (-0700) Subject: ceph_filestore_dump: Add --skip-journal-replay and --skip-mount-omap X-Git-Tag: v0.80.10~69^2~89 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=dadecb1e05e528093642ba356fa7a70a0b546727;p=ceph.git ceph_filestore_dump: Add --skip-journal-replay and --skip-mount-omap Signed-off-by: David Zafman (cherry picked from commit 2e9dcb256509e7c921556202052f0cc1dcd91398) --- diff --git a/src/tools/ceph_filestore_dump.cc b/src/tools/ceph_filestore_dump.cc index a5ae6971de6f..d5eee190aa26 100644 --- a/src/tools/ceph_filestore_dump.cc +++ b/src/tools/ceph_filestore_dump.cc @@ -1103,6 +1103,8 @@ int main(int argc, char **argv) ("file", po::value(&file), "path of file to export or import") ("debug", "Enable diagnostic output to stderr") + ("skip-journal-replay", "Disable journal replay") + ("skip-mount-omap", "Disable mounting of omap") ; po::variables_map vm; @@ -1197,6 +1199,12 @@ int main(int argc, char **argv) debug = true; } + osflagbits_t flags = 0; + if (vm.count("skip-journal-replay")) + flags |= SKIP_JOURNAL_REPLAY; + if (vm.count("skip-mount-omap")) + flags |= SKIP_MOUNT_OMAP; + global_init( &def_args, ceph_options, CEPH_ENTITY_TYPE_OSD, CODE_ENVIRONMENT_UTILITY_NODOUT, 0); @@ -1241,7 +1249,7 @@ int main(int argc, char **argv) return 1; } - ObjectStore *fs = new FileStore(fspath, jpath); + ObjectStore *fs = ObjectStore::create(NULL, "filestore", fspath, jpath, flags); int r = fs->mount(); if (r < 0) {