f->dump_unsigned("hit_set_period", hit_set_period);
f->dump_unsigned("hit_set_count", hit_set_count);
f->dump_unsigned("min_read_recency_for_promote", min_read_recency_for_promote);
+ f->dump_unsigned("min_write_recency_for_promote", min_write_recency_for_promote);
f->dump_unsigned("stripe_width", get_stripe_width());
f->dump_unsigned("expected_num_objects", expected_num_objects);
}
return;
}
- ENCODE_START(19, 5, bl);
+ ENCODE_START(20, 5, bl);
::encode(type, bl);
::encode(size, bl);
::encode(crush_ruleset, bl);
::encode(min_read_recency_for_promote, bl);
::encode(expected_num_objects, bl);
::encode(cache_target_dirty_high_ratio_micro, bl);
+ ::encode(min_write_recency_for_promote, bl);
ENCODE_FINISH(bl);
}
void pg_pool_t::decode(bufferlist::iterator& bl)
{
- DECODE_START_LEGACY_COMPAT_LEN(19, 5, 5, bl);
+ DECODE_START_LEGACY_COMPAT_LEN(20, 5, 5, bl);
::decode(type, bl);
::decode(size, bl);
::decode(crush_ruleset, bl);
} else {
cache_target_dirty_high_ratio_micro = cache_target_dirty_ratio_micro;
}
+ if (struct_v >= 20) {
+ ::decode(min_write_recency_for_promote, bl);
+ } else {
+ min_write_recency_for_promote = 1;
+ }
DECODE_FINISH(bl);
calc_pg_masks();
}
a.hit_set_period = 3600;
a.hit_set_count = 8;
a.min_read_recency_for_promote = 1;
+ a.min_write_recency_for_promote = 1;
a.set_stripe_width(12345);
a.target_max_bytes = 1238132132;
a.target_max_objects = 1232132;
}
if (p.min_read_recency_for_promote)
out << " min_read_recency_for_promote " << p.min_read_recency_for_promote;
+ if (p.min_write_recency_for_promote)
+ out << " min_write_recency_for_promote " << p.min_write_recency_for_promote;
out << " stripe_width " << p.get_stripe_width();
if (p.expected_num_objects)
out << " expected_num_objects " << p.expected_num_objects;
HitSet::Params hit_set_params; ///< The HitSet params to use on this pool
uint32_t hit_set_period; ///< periodicity of HitSet segments (seconds)
uint32_t hit_set_count; ///< number of periods to retain
- uint32_t min_read_recency_for_promote; ///< minimum number of HitSet to check before promote
+ uint32_t min_read_recency_for_promote; ///< minimum number of HitSet to check before promote on read
+ uint32_t min_write_recency_for_promote; ///< minimum number of HitSet to check before promote on write
uint32_t stripe_width; ///< erasure coded stripe size in bytes
hit_set_period(0),
hit_set_count(0),
min_read_recency_for_promote(0),
+ min_write_recency_for_promote(0),
stripe_width(0),
expected_num_objects(0)
{ }