mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-15 15:06:42 +00:00
New subroutine "vm_page_set_validclean" for a vfs_bio improvement.
This commit is contained in:
parent
8c601f7da8
commit
4589a4b5dc
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=10542
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)vm_page.c 7.4 (Berkeley) 5/7/91
|
||||
* $Id: vm_page.c,v 1.33 1995/07/13 08:48:37 davidg Exp $
|
||||
* $Id: vm_page.c,v 1.34 1995/07/20 05:28:07 davidg Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -998,6 +998,22 @@ vm_page_bits(int base, int size)
|
||||
return (chunk << base) & VM_PAGE_BITS_ALL;
|
||||
}
|
||||
|
||||
/*
|
||||
* set a page valid and clean
|
||||
*/
|
||||
void
|
||||
vm_page_set_validclean(m, base, size)
|
||||
vm_page_t m;
|
||||
int base;
|
||||
int size;
|
||||
{
|
||||
int pagebits = vm_page_bits(base, size);
|
||||
m->valid |= pagebits;
|
||||
m->dirty &= ~pagebits;
|
||||
if( base == 0 && size == PAGE_SIZE)
|
||||
pmap_clear_modify(VM_PAGE_TO_PHYS(m));
|
||||
}
|
||||
|
||||
/*
|
||||
* set a page (partially) valid
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user