#include "erasure-code/ErasureCodeInterface.h"
#include "mon/MonOpRequest.h"
+#include <boost/functional/hash.hpp>
+// re-include our assert to clobber the system one; fix dout:
+#include "include/assert.h"
/// information about a particular peer's failure reports for one osd
struct failure_reporter_t {
map<int,double> osd_weight;
- SimpleLRU<version_t, bufferlist> inc_osd_cache;
- SimpleLRU<version_t, bufferlist> full_osd_cache;
+ using osdmap_key_t = std::pair<version_t, uint64_t>;
+ using osdmap_cache_t = SimpleLRU<osdmap_key_t,
+ bufferlist,
+ std::less<osdmap_key_t>,
+ boost::hash<osdmap_key_t>>;
+ osdmap_cache_t inc_osd_cache;
+ osdmap_cache_t full_osd_cache;
bool check_failures(utime_t now);
bool check_failure(utime_t now, int target_osd, failure_info_t& fi);
void force_failure(int target_osd, int by);
- // the time of last msg(MSG_ALIVE and MSG_PGTEMP) proposed without delay
- utime_t last_attempted_minwait_time;
-
bool _have_pending_crush();
CrushWrapper &_get_stable_crush();
void _get_pending_crush(CrushWrapper& newcrush);
bool can_mark_in(int o);
// ...
- MOSDMap *build_latest_full();
- MOSDMap *build_incremental(epoch_t first, epoch_t last);
+ MOSDMap *build_latest_full(uint64_t features);
+ MOSDMap *build_incremental(epoch_t first, epoch_t last, uint64_t features);
void send_full(MonOpRequestRef op);
void send_incremental(MonOpRequestRef op, epoch_t first);
public:
int _prepare_remove_pool(int64_t pool, ostream *ss, bool no_fake);
int _prepare_rename_pool(int64_t pool, string newname);
+ bool enforce_pool_op_caps(MonOpRequestRef op);
bool preprocess_pool_op (MonOpRequestRef op);
bool preprocess_pool_op_create (MonOpRequestRef op);
bool prepare_pool_op (MonOpRequestRef op);
int load_metadata(int osd, map<string, string>& m, ostream *err);
void count_metadata(const string& field, Formatter *f);
+
+ void reencode_incremental_map(bufferlist& bl, uint64_t features);
+ void reencode_full_map(bufferlist& bl, uint64_t features);
public:
void count_metadata(const string& field, map<string,int> *out);
protected:
}
int get_version(version_t ver, bufferlist& bl) override;
+ int get_version(version_t ver, uint64_t feature, bufferlist& bl);
+
+ int get_version_full(version_t ver, uint64_t feature, bufferlist& bl);
int get_version_full(version_t ver, bufferlist& bl) override;
epoch_t blacklist(const entity_addr_t& a, utime_t until);