Any extent with dirty_from == journal_seq_t() is in the process of being
dirtied for the first time and hasn't had dirty_from filled in yet. As
such, its dirty_from will end up being after the current journal_head.
Signed-off-by: Samuel Just <sjust@redhat.com>
std::vector<CachedExtentRef> ret;
for (auto i = dirty.begin(); i != dirty.end(); ++i) {
CachedExtentRef cand;
- if (i->dirty_from < seq) {
+ if (i->dirty_from != journal_seq_t() && i->dirty_from < seq) {
logger().debug(
"Cache::get_next_dirty_extents: next {}",
*i);