const auto t_src = t.get_src();
if (is_root_type(prev->get_type())) {
- assert(prev->is_stable_clean()
- || prev->primary_ref_list_hook.is_linked());
- if (prev->is_stable_dirty()) {
- // add the new dirty root to front
- remove_from_dirty(prev, nullptr/* exclude root */);
- }
+ assert(prev->is_stable_dirty());
+ assert(prev->primary_ref_list_hook.is_linked());
+ // add the new dirty root to front
+ remove_from_dirty(prev, nullptr/* exclude root */);
add_to_dirty(next, nullptr/* exclude root */);
} else if (prev->is_stable_dirty()) {
replace_dirty(next, prev, t_src);
return;
}
+ assert(i->is_stable_clean_pending());
bool is_inline = false;
if (i->is_inline()) {
is_inline = true;
const auto t_src = t.get_src();
touch_extent(*i, &t_src, t.get_cache_hint());
i->complete_io();
- assert(i->is_stable_clean());
epm.commit_space_used(i->get_paddr(), i->get_length());
// Note: commit extents and backref allocations in the same place
++access_stats.trans_dirty;
++stats.access.trans_dirty;
} else {
+ assert(ret->is_stable_clean());
++access_stats.trans_lru;
++stats.access.trans_lru;
}
++access_stats.cache_dirty;
++stats.access.cache_dirty;
} else {
+ assert(ret->is_stable_clean());
++access_stats.cache_lru;
++stats.access.cache_lru;
}
t, T::TYPE, offset, length);
const auto t_src = t.get_src();
auto f = [&t, this, t_src](CachedExtent &ext) {
- // FIXME: assert(ext.is_stable_clean());
+ // XXX: is_stable_dirty() may not be linked in lba tree
assert(ext.is_stable());
assert(T::TYPE == ext.get_type());
cache_access_stats_t& access_stats = get_by_ext(
++access_stats.cache_dirty;
++stats.access.cache_dirty;
} else {
+ assert(p_extent->is_stable_clean());
++access_stats.cache_lru;
++stats.access.cache_lru;
}
++access_stats.trans_dirty;
++stats.access.trans_dirty;
} else {
+ assert(p_extent->is_stable_clean());
++access_stats.trans_lru;
++stats.access.trans_lru;
}
t, type, offset, length, laddr);
const auto t_src = t.get_src();
auto f = [&t, this, t_src](CachedExtent &ext) {
- // FIXME: assert(ext.is_stable_clean());
+ // XXX: is_stable_dirty() may not be linked in lba tree
assert(ext.is_stable());
cache_access_stats_t& access_stats = get_by_ext(
get_by_src(stats.access_by_src_ext, t_src),
double seconds) const;
void remove_from_lru(CachedExtent &extent) {
- assert(extent.is_stable_clean() && !extent.is_placeholder());
+ assert(extent.is_stable_clean());
+ assert(!extent.is_placeholder());
if (extent.primary_ref_list_hook.is_linked()) {
do_remove_from_lru(extent, nullptr);
void move_to_top(
CachedExtent &extent,
const Transaction::src_t* p_src) {
- assert(extent.is_stable_clean() && !extent.is_placeholder());
+ assert(extent.is_stable_clean());
+ assert(!extent.is_placeholder());
auto extent_loaded_length = extent.get_loaded_length();
if (extent.primary_ref_list_hook.is_linked()) {
assert(extent.is_data_stable());
if (extent.primary_ref_list_hook.is_linked()) {
- assert(extent.is_stable_clean() && !extent.is_placeholder());
+ assert(extent.is_stable_clean());
+ assert(!extent.is_placeholder());
// present, increase size
assert(lru.size() > 0);
current_size += increased_length;