spg_t pgid;
snapid_t snap;
uint64_t seq;
- char val;
if (it->is_temp(pgid) ||
it->is_removal(&seq, &pgid) ||
- store->collection_getattr(*it, "remove", &val, 1) > 0) {
+ (it->is_pg(pgid, snap) &&
+ PG::_has_removal_flag(store, pgid))) {
dout(10) << "load_pgs " << *it << " clearing temp" << dendl;
recursive_remove_collection(store, *it);
continue;
dirty_big_info = false;
}
+bool PG::_has_removal_flag(ObjectStore *store,
+ spg_t pgid)
+{
+ coll_t coll(pgid);
+ char val;
+ if (store->collection_getattr(coll, "remove", &val, 1) > 0)
+ return true;
+ return false;
+}
+
+
epoch_t PG::peek_map_epoch(ObjectStore *store,
spg_t pgid,
hobject_t legacy_infos_oid,
hobject_t &infos_oid,
interval_set<snapid_t> &snap_collections, __u8 &);
void read_state(ObjectStore *store, bufferlist &bl);
+ static bool _has_removal_flag(ObjectStore *store, spg_t pgid);
static epoch_t peek_map_epoch(ObjectStore *store, spg_t pgid,
hobject_t legacy_infos_oid,
bufferlist *bl);
#include "osd/PGLog.h"
#include "osd/OSD.h"
+#include "osd/PG.h"
#include "json_spirit/json_spirit_value.h"
#include "json_spirit/json_spirit_reader.h"
uint64_t seq;
coll_t coll(pgid);
- char val;
if (it->is_removal(&seq, &pgid) ||
- store->collection_getattr(coll, "remove", &val, 1) == 1) {
+ PG::_has_removal_flag(store, pgid)) {
cout << "finish_remove_pgs removing " << *it
<< " pgid is " << pgid << std::endl;
remove_coll(store, *it);