@@ -750,6 +750,7 @@ void Cache::add_to_dirty(CachedExtentRef ref)
750750 assert (ref->is_dirty ());
751751 assert (!ref->primary_ref_list_hook .is_linked ());
752752 ceph_assert (ref->get_modify_time () != NULL_TIME);
753+ assert (ref->is_fully_loaded ());
753754
754755 // Note: next might not be at extent_state_t::DIRTY,
755756 // also see CachedExtent::is_stable_writting()
@@ -762,6 +763,7 @@ void Cache::remove_from_dirty(CachedExtentRef ref)
762763{
763764 assert (ref->is_dirty ());
764765 ceph_assert (ref->primary_ref_list_hook .is_linked ());
766+ assert (ref->is_fully_loaded ());
765767
766768 stats.dirty_bytes -= ref->get_length ();
767769 dirty.erase (dirty.s_iterator_to (*ref));
@@ -774,12 +776,14 @@ void Cache::replace_dirty(
774776{
775777 assert (prev->is_dirty ());
776778 ceph_assert (prev->primary_ref_list_hook .is_linked ());
779+ assert (prev->is_fully_loaded ());
777780
778781 // Note: next might not be at extent_state_t::DIRTY,
779782 // also see CachedExtent::is_stable_writting()
780783 assert (next->is_dirty ());
781784 assert (!next->primary_ref_list_hook .is_linked ());
782785 ceph_assert (next->get_modify_time () != NULL_TIME);
786+ assert (next->is_fully_loaded ());
783787
784788 assert (prev->get_dirty_from () == next->get_dirty_from ());
785789 assert (prev->get_length () == next->get_length ());
@@ -799,6 +803,7 @@ void Cache::clear_dirty()
799803 auto ptr = &*i;
800804 assert (ptr->is_dirty ());
801805 ceph_assert (ptr->primary_ref_list_hook .is_linked ());
806+ assert (ptr->is_fully_loaded ());
802807
803808 stats.dirty_bytes -= ptr->get_length ();
804809 dirty.erase (i++);
0 commit comments