1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
4 #ifndef CEPH_SCRUB_RESULT_H
5 #define CEPH_SCRUB_RESULT_H
7 #include "SnapMapper.h" // for OSDriver
8 #include "common/map_cacher.hpp"
14 struct inconsistent_obj_wrapper
;
15 struct inconsistent_snapset_wrapper
;
22 static Store
* create(ObjectStore
* store
,
23 ObjectStore::Transaction
* t
,
26 void add_object_error(int64_t pool
, const inconsistent_obj_wrapper
& e
);
27 void add_snap_error(int64_t pool
, const inconsistent_snapset_wrapper
& e
);
29 void flush(ObjectStore::Transaction
*);
30 void cleanup(ObjectStore::Transaction
*);
31 std::vector
<bufferlist
> get_snap_errors(ObjectStore
* store
,
33 const librados::object_id_t
& start
,
35 std::vector
<bufferlist
> get_object_errors(ObjectStore
* store
,
37 const librados::object_id_t
& start
,
40 Store(const coll_t
& coll
, const ghobject_t
& oid
, ObjectStore
* store
);
41 std::vector
<bufferlist
> get_errors(ObjectStore
* store
,
42 const string
& start
, const string
& end
,
46 const ghobject_t hoid
;
47 // a temp object holding mappings from seq-id to inconsistencies found in
50 MapCacher::MapCacher
<std::string
, bufferlist
> backend
;
51 map
<string
, bufferlist
> results
;
55 #endif // CEPH_SCRUB_RESULT_H