*
*/
+#include "PurgeQueue.h"
+#include "BatchOp.h"
+#include "mds/MDSMap.h"
+
#include "common/debug.h"
+#include "common/Formatter.h"
#include "mds/mdstypes.h"
#include "mds/CInode.h"
-#include "mds/MDCache.h"
-
-#include "PurgeQueue.h"
+#include "osdc/Objecter.h"
+#include "osdc/Striper.h"
#define dout_context cct
#define dout_subsys ceph_subsys_mds
DECODE_FINISH(p);
}
+void PurgeItem::dump(Formatter *f) const
+{
+ f->dump_int("action", action);
+ f->dump_int("ino", ino);
+ f->dump_int("size", size);
+ f->open_object_section("layout");
+ layout.dump(f);
+ f->close_section();
+ f->open_object_section("SnapContext");
+ snapc.dump(f);
+ f->close_section();
+ f->open_object_section("fragtree");
+ fragtree.dump(f);
+ f->close_section();
+}
+
void PurgeItem::generate_test_instances(std::list<PurgeItem*>& ls) {
ls.push_back(new PurgeItem());
ls.push_back(new PurgeItem());
ls.back()->snapc = SnapContext();
ls.back()->stamp = utime_t(3, 4);
}
+
// if Objecter has any slow requests, take that as a hint and
// slow down our rate of purging
PurgeQueue::PurgeQueue(
#ifndef PURGE_QUEUE_H_
#define PURGE_QUEUE_H_
-#include "include/compact_set.h"
+#include "mds/mdstypes.h"
#include "common/Finisher.h"
-#include "mds/MDSMap.h"
+#include "common/snap_types.h" // for class SnapContext
#include "osdc/Journaler.h"
+#include "include/frag.h"
+#include <cstdint>
+#include <map>
+#include <memory>
+#include <set>
+#include <string>
+#include <string_view>
+#include <vector>
+
+namespace ceph { class Formatter; }
+class MDSMap;
/**
* Descriptor of the work associated with purging a file. We record
return PurgeItem::actions.at(std::string(str));
}
- void dump(Formatter *f) const
- {
- f->dump_int("action", action);
- f->dump_int("ino", ino);
- f->dump_int("size", size);
- f->open_object_section("layout");
- layout.dump(f);
- f->close_section();
- f->open_object_section("SnapContext");
- snapc.dump(f);
- f->close_section();
- f->open_object_section("fragtree");
- fragtree.dump(f);
- f->close_section();
- }
+ void dump(Formatter *f) const;
static void generate_test_instances(std::list<PurgeItem*>& ls);
std::string_view get_type_str() const;