X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fceph%2Fsrc%2Ftools%2Fcephfs%2FJournalTool.h;fp=src%2Fceph%2Fsrc%2Ftools%2Fcephfs%2FJournalTool.h;h=0000000000000000000000000000000000000000;hb=7da45d65be36d36b880cc55c5036e96c24b53f00;hp=d3944144ddcf4693a98982655c0b009ee1998f7d;hpb=691462d09d0987b47e112d6ee8740375df3c51b2;p=stor4nfv.git diff --git a/src/ceph/src/tools/cephfs/JournalTool.h b/src/ceph/src/tools/cephfs/JournalTool.h deleted file mode 100644 index d394414..0000000 --- a/src/ceph/src/tools/cephfs/JournalTool.h +++ /dev/null @@ -1,87 +0,0 @@ -// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- -// vim: ts=8 sw=2 smarttab -/* - * Ceph - scalable distributed file system - * - * Copyright (C) 2014 John Spray - * - * This is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License version 2.1, as published by the Free Software - * Foundation. See file COPYING. - */ - -#include "MDSUtility.h" -#include "RoleSelector.h" -#include - -#include "mds/mdstypes.h" -#include "mds/LogEvent.h" -#include "mds/events/EMetaBlob.h" - -#include "include/rados/librados.hpp" - -#include "JournalFilter.h" - -class JournalScanner; - - -/** - * Command line tool for investigating and repairing filesystems - * with damaged metadata logs - */ -class JournalTool : public MDSUtility -{ - private: - MDSRoleSelector role_selector; - // Bit hacky, use this `rank` member to control behaviour of the - // various main_ functions. - mds_rank_t rank; - - // Entry points - int main_journal(std::vector &argv); - int main_header(std::vector &argv); - int main_event(std::vector &argv); - - // Shared functionality - int recover_journal(); - - // Journal operations - int journal_inspect(); - int journal_export(std::string const &path, bool import); - int journal_reset(bool hard); - - // Header operations - int header_set(); - - // I/O handles - librados::Rados rados; - librados::IoCtx input; - librados::IoCtx output; - - bool other_pool; - - // Metadata backing store manipulation - int read_lost_found(std::set &lost); - int recover_dentries( - EMetaBlob const &metablob, - bool const dry_run, - std::set *consumed_inos); - - // Splicing - int erase_region(JournalScanner const &jp, uint64_t const pos, uint64_t const length); - - // Backing store helpers - void encode_fullbit_as_inode( - const EMetaBlob::fullbit &fb, - const bool bare, - bufferlist *out_bl); - int consume_inos(const std::set &inos); - - public: - void usage(); - JournalTool() : - rank(0), other_pool(false) {} - int main(std::vector &argv); -}; -