Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / ceph / src / tools / ceph_objectstore_tool.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
3 /*
4  * Ceph - scalable distributed file system
5  *
6  * Copyright (C) 2013 Inktank
7  *
8  * This is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License version 2.1, as published by the Free Software
11  * Foundation.  See file COPYING.
12  *
13  */
14
15 #ifndef CEPH_OBJECTSTORE_TOOL_H_
16 #define CEPH_OBJECTSTORE_TOOL_H_
17
18 #include "RadosDump.h"
19
20 class ObjectStoreTool : public RadosDump
21 {
22   public:
23     ObjectStoreTool(int file_fd, bool dry_run)
24       : RadosDump(file_fd, dry_run)
25     {}
26
27     int do_import(ObjectStore *store, OSDSuperblock& sb, bool force,
28                   std::string pgidstr,
29                   ObjectStore::Sequencer &osr);
30     int do_export(ObjectStore *fs, coll_t coll, spg_t pgid,
31           pg_info_t &info, epoch_t map_epoch, __u8 struct_ver,
32           const OSDSuperblock& superblock,
33           PastIntervals &past_intervals);
34     int get_object(
35       ObjectStore *store, coll_t coll,
36       bufferlist &bl, OSDMap &curmap, bool *skipped_objects,
37       ObjectStore::Sequencer &osr);
38     int export_file(
39         ObjectStore *store, coll_t cid, ghobject_t &obj);
40     int export_files(ObjectStore *store, coll_t coll);
41 };
42
43 #endif // CEPH_OBJECSTORE_TOOL_H_