add_to_dirty_lists(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… add_to_dirty_lists(9) β€” like, the Kernel API Manual era

okay so bestie, welcome to add_to_dirty_lists(9) 🌸 β€” this is a genuine kernel API manual page and it's honestly kinda iconic. buckle up, we're going into the block map πŸ’–


✨ NAME ✨

add_to_dirty_lists β€” add an element to the dirty lists.</p> that's it, that's the whole vibe. πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

void add_to_dirty_lists (struct block_map_zone *zone , struct list_head
*entry , enum block_map_page_type type , sequence_number_t old_period ,
sequence_number_t new_period );

look at her. five whole arguments. main character energy fr fr πŸ‘‘


πŸ’… ARGUMENTS πŸ’…

okay so let's meet the cast 🫢 β€” every single one, no skipping:

  • zone β€” the zone we're operating in rn. like, the neighborhood this whole thing lives in. 🏠
  • entry β€” the list entry of the element we're adding. the actual thing being yeeted onto the list. ✨
  • type β€” the type of page. gotta know what kinda page we're dealing with, iykyk.
  • old_period β€” the period in which the element was previously dirtied β€” or 0 if it wasn't dirty at all. so 0 = it was clean, no cap. 🧼
  • new_period β€” the period in which the element has now been dirtied β€” or 0 if it does not hold a lock. πŸ”’ so like, 0 here is a whole different situation, don't mix them up bestie.
lowkey important: old_period and new_period both use 0 as a special "nope" value, but they mean different nopes. 0 in old_period = wasn't dirty. 0 in new_period = doesn't hold a lock. πŸ’€ don't conflate them.

🧚 SEE ALSO 🧚

the whole friend group 🫢 β€” literally every single one, in order, because we do not leave anyone out:

Block map eras(9), initialize_info(9), allocate_cache_components(9), assert_on_cache_thread(9), get_page_state_name(9), update_counter(9), set_info_state(9), find_free_page(9), find_page(9), select_lru_page(9), complete_with_page(9), complete_waiter_with_error(9), complete_waiter_with_page(9), distribute_page_over_waitq(9), set_persistent_error(9), validate_completed_page(9), handle_load_error(9), page_is_loaded(9), handle_rebuild_read_error(9), launch_page_load(9), schedule_page_save(9), launch_page_save(9), completion_needs_page(9), allocate_free_page(9), discard_a_page(9), discard_page_if_needed(9), write_has_finished(9), handle_page_write_error(9), page_is_written_out(9), write_pages(9), vdo_release_page_completion(9), vdo_get_page(9), vdo_request_page_write(9), vdo_get_cached_page(9), vdo_invalidate_page_cache(9), get_tree_page_by_index(9), in_cyclic_range(9), is_not_older(9), vdo_find_block_map_slot(9), make_forest(9), replace_forest(9), finish_cursor(9), continue_traversal(9), finish_traversal_load(9), traverse(9), launch_cursor(9), compute_boundary(9), vdo_traverse_forest(9), initialize_block_map_zone(9), clear_mapped_location(9), set_mapped_location(9)

and the kernel file she lives in πŸŽ€: ./drivers/md/dm-vdo/block-map.c


kisses bestie, go read the block map πŸ’œ

this page is from ./drivers/md/dm-vdo, dated October 2026, and honestly? timeless. mwah. πŸ’‹

πŸ“¦ where this page comes from