MCPcopy Create free account
hub / github.com/F-Stack/f-stack / vm_page_set_dirty

Function vm_page_set_dirty

freebsd/vm/vm_page.c:5068–5084  ·  view source on GitHub ↗

* Set the page dirty bits and free the invalid swap space if * present. Returns the previous dirty bits. */

Source from the content-addressed store, hash-verified

5066 * present. Returns the previous dirty bits.
5067 */
5068vm_page_bits_t
5069vm_page_set_dirty(vm_page_t m)
5070{
5071 vm_page_bits_t old;
5072
5073 VM_PAGE_OBJECT_BUSY_ASSERT(m);
5074
5075 if (vm_page_xbusied(m) && !pmap_page_is_write_mapped(m)) {
5076 old = m->dirty;
5077 m->dirty = VM_PAGE_BITS_ALL;
5078 } else
5079 old = vm_page_bits_swap(m, &m->dirty, VM_PAGE_BITS_ALL);
5080 if (old == 0 && (m->a.flags & PGA_SWAP_SPACE) != 0)
5081 vm_pager_page_unswapped(m);
5082
5083 return (old);
5084}
5085
5086/*
5087 * Clear the given bits from the specified page's dirty field.

Callers 3

uiomove_object_pageFunction · 0.85
shm_dotruncate_lockedFunction · 0.85
vm_fault_dirtyFunction · 0.85

Calls 2

vm_page_bits_swapFunction · 0.85
vm_pager_page_unswappedFunction · 0.85

Tested by

no test coverage detected