@@ -739,7 +739,7 @@ void Cache::add_extent(CachedExtentRef ref)
739739void Cache::mark_dirty (CachedExtentRef ref)
740740{
741741 assert (ref->get_paddr ().is_absolute ());
742- if (ref->is_dirty ()) {
742+ if (ref->has_delta ()) {
743743 assert (ref->primary_ref_list_hook .is_linked ());
744744 return ;
745745 }
@@ -753,7 +753,7 @@ void Cache::add_to_dirty(
753753 CachedExtentRef ref,
754754 const Transaction::src_t * p_src)
755755{
756- assert (ref->is_dirty ());
756+ assert (ref->has_delta ());
757757 assert (!ref->primary_ref_list_hook .is_linked ());
758758 ceph_assert (ref->get_modify_time () != NULL_TIME);
759759 assert (ref->is_fully_loaded ());
@@ -785,7 +785,7 @@ void Cache::remove_from_dirty(
785785 CachedExtentRef ref,
786786 const Transaction::src_t * p_src)
787787{
788- assert (ref->is_dirty ());
788+ assert (ref->has_delta ());
789789 ceph_assert (ref->primary_ref_list_hook .is_linked ());
790790 assert (ref->is_fully_loaded ());
791791 assert (ref->get_paddr ().is_absolute () ||
@@ -817,13 +817,13 @@ void Cache::replace_dirty(
817817 CachedExtentRef prev,
818818 const Transaction::src_t & src)
819819{
820- assert (prev->is_dirty ());
820+ assert (prev->has_delta ());
821821 ceph_assert (prev->primary_ref_list_hook .is_linked ());
822822 assert (prev->is_fully_loaded ());
823823
824824 // Note: next might not be at extent_state_t::DIRTY,
825825 // also see CachedExtent::is_stable_writting()
826- assert (next->is_dirty ());
826+ assert (next->has_delta ());
827827 assert (!next->primary_ref_list_hook .is_linked ());
828828 ceph_assert (next->get_modify_time () != NULL_TIME);
829829 assert (next->is_fully_loaded ());
@@ -849,7 +849,7 @@ void Cache::clear_dirty()
849849{
850850 for (auto i = dirty.begin (); i != dirty.end (); ) {
851851 auto ptr = &*i;
852- assert (ptr->is_dirty ());
852+ assert (ptr->has_delta ());
853853 ceph_assert (ptr->primary_ref_list_hook .is_linked ());
854854 assert (ptr->is_fully_loaded ());
855855
@@ -873,7 +873,7 @@ void Cache::remove_extent(
873873 assert (ref->is_valid ());
874874 assert (ref->get_paddr ().is_absolute () ||
875875 ref->get_paddr ().is_root ());
876- if (ref->is_dirty ()) {
876+ if (ref->has_delta ()) {
877877 remove_from_dirty (ref, p_src);
878878 } else if (!ref->is_placeholder ()) {
879879 assert (ref->get_paddr ().is_absolute ());
@@ -907,12 +907,12 @@ void Cache::commit_replace_extent(
907907 if (is_root_type (prev->get_type ())) {
908908 assert (prev->is_stable_clean ()
909909 || prev->primary_ref_list_hook .is_linked ());
910- if (prev->is_dirty ()) {
910+ if (prev->has_delta ()) {
911911 // add the new dirty root to front
912912 remove_from_dirty (prev, nullptr /* exclude root */ );
913913 }
914914 add_to_dirty (next, nullptr /* exclude root */ );
915- } else if (prev->is_dirty ()) {
915+ } else if (prev->has_delta ()) {
916916 replace_dirty (next, prev, t_src);
917917 } else {
918918 lru.remove_from_lru (*prev);
@@ -1548,7 +1548,7 @@ record_t Cache::prepare_record(
15481548 // exist mutation pending extents must be in t.mutated_block_list
15491549 add_extent (i);
15501550 const auto t_src = t.get_src ();
1551- if (i->is_dirty ()) {
1551+ if (i->has_delta ()) {
15521552 add_to_dirty (i, &t_src);
15531553 } else {
15541554 touch_extent (*i, &t_src, t.get_cache_hint ());
@@ -1795,7 +1795,7 @@ void Cache::complete_commit(
17951795 t, is_inline, *i);
17961796 i->invalidate_hints ();
17971797 add_extent (i);
1798- assert (!i->is_dirty ());
1798+ assert (!i->has_delta ());
17991799 const auto t_src = t.get_src ();
18001800 touch_extent (*i, &t_src, t.get_cache_hint ());
18011801 i->complete_io ();
0 commit comments