Rename vm_page_set_valid() to vm_page_set_valid_range().
The vm_page_set_valid() is the most reasonable name for the m->valid accessor. Reviewed by: attilio, alc
This commit is contained in:
parent
d28e8f62e8
commit
dc874f9881
@ -211,7 +211,7 @@ ncl_getpages(struct vop_getpages_args *ap)
|
||||
* Read operation filled a partial page.
|
||||
*/
|
||||
m->valid = 0;
|
||||
vm_page_set_valid(m, 0, size - toff);
|
||||
vm_page_set_valid_range(m, 0, size - toff);
|
||||
KASSERT(m->dirty == 0,
|
||||
("nfs_getpages: page %p is dirty", m));
|
||||
} else {
|
||||
|
@ -452,7 +452,7 @@ nwfs_getpages(ap)
|
||||
("nwfs_getpages: page %p is dirty", m));
|
||||
} else {
|
||||
int nvalid = ((size + DEV_BSIZE - 1) - toff) & ~(DEV_BSIZE - 1);
|
||||
vm_page_set_valid(m, 0, nvalid);
|
||||
vm_page_set_valid_range(m, 0, nvalid);
|
||||
KASSERT((m->dirty & vm_page_bits(0, nvalid)) == 0,
|
||||
("nwfs_getpages: page %p is dirty", m));
|
||||
}
|
||||
|
@ -509,7 +509,7 @@ smbfs_getpages(ap)
|
||||
* Read operation filled a partial page.
|
||||
*/
|
||||
m->valid = 0;
|
||||
vm_page_set_valid(m, 0, size - toff);
|
||||
vm_page_set_valid_range(m, 0, size - toff);
|
||||
KASSERT(m->dirty == 0,
|
||||
("smbfs_getpages: page %p is dirty", m));
|
||||
} else {
|
||||
|
@ -301,7 +301,7 @@ shm_dotruncate(struct shmfd *shmfd, off_t length)
|
||||
* have been zeroed. Some of these valid bits may
|
||||
* have already been set.
|
||||
*/
|
||||
vm_page_set_valid(m, base, size);
|
||||
vm_page_set_valid_range(m, base, size);
|
||||
|
||||
/*
|
||||
* Round "base" to the next block boundary so that the
|
||||
|
@ -3499,7 +3499,7 @@ vfs_page_set_valid(struct buf *bp, vm_ooffset_t off, vm_page_t m)
|
||||
* entire page.
|
||||
*/
|
||||
if (eoff > off)
|
||||
vm_page_set_valid(m, off & PAGE_MASK, eoff - off);
|
||||
vm_page_set_valid_range(m, off & PAGE_MASK, eoff - off);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -3662,7 +3662,7 @@ vfs_bio_set_valid(struct buf *bp, int base, int size)
|
||||
m = bp->b_pages[i];
|
||||
if (n > size)
|
||||
n = size;
|
||||
vm_page_set_valid(m, base & PAGE_MASK, n);
|
||||
vm_page_set_valid_range(m, base & PAGE_MASK, n);
|
||||
base += n;
|
||||
size -= n;
|
||||
n = PAGE_SIZE;
|
||||
|
@ -206,7 +206,7 @@ nfs_getpages(struct vop_getpages_args *ap)
|
||||
* Read operation filled a partial page.
|
||||
*/
|
||||
m->valid = 0;
|
||||
vm_page_set_valid(m, 0, size - toff);
|
||||
vm_page_set_valid_range(m, 0, size - toff);
|
||||
KASSERT(m->dirty == 0,
|
||||
("nfs_getpages: page %p is dirty", m));
|
||||
} else {
|
||||
|
@ -2538,7 +2538,7 @@ vm_page_bits(int base, int size)
|
||||
}
|
||||
|
||||
/*
|
||||
* vm_page_set_valid:
|
||||
* vm_page_set_valid_range:
|
||||
*
|
||||
* Sets portions of a page valid. The arguments are expected
|
||||
* to be DEV_BSIZE aligned but if they aren't the bitmap is inclusive
|
||||
@ -2548,7 +2548,7 @@ vm_page_bits(int base, int size)
|
||||
* (base + size) must be less then or equal to PAGE_SIZE.
|
||||
*/
|
||||
void
|
||||
vm_page_set_valid(vm_page_t m, int base, int size)
|
||||
vm_page_set_valid_range(vm_page_t m, int base, int size)
|
||||
{
|
||||
int endoff, frag;
|
||||
|
||||
@ -2581,7 +2581,7 @@ vm_page_set_valid(vm_page_t m, int base, int size)
|
||||
* is already dirty.
|
||||
*/
|
||||
KASSERT((~m->valid & vm_page_bits(base, size) & m->dirty) == 0,
|
||||
("vm_page_set_valid: page %p is dirty", m));
|
||||
("vm_page_set_valid_range: page %p is dirty", m));
|
||||
|
||||
/*
|
||||
* Set valid bits inclusive of any overlap.
|
||||
|
@ -396,7 +396,7 @@ void vm_page_reference(vm_page_t m);
|
||||
void vm_page_remove (vm_page_t);
|
||||
void vm_page_rename (vm_page_t, vm_object_t, vm_pindex_t);
|
||||
void vm_page_requeue(vm_page_t m);
|
||||
void vm_page_set_valid(vm_page_t m, int base, int size);
|
||||
void vm_page_set_valid_range(vm_page_t m, int base, int size);
|
||||
void vm_page_sleep(vm_page_t m, const char *msg);
|
||||
vm_page_t vm_page_splay(vm_pindex_t, vm_page_t);
|
||||
vm_offset_t vm_page_startup(vm_offset_t vaddr);
|
||||
|
@ -413,7 +413,7 @@ vnode_pager_setsize(vp, nsize)
|
||||
* have been zeroed. Some of these valid bits may
|
||||
* have already been set.
|
||||
*/
|
||||
vm_page_set_valid(m, base, size);
|
||||
vm_page_set_valid_range(m, base, size);
|
||||
|
||||
/*
|
||||
* Round "base" to the next block boundary so that the
|
||||
@ -964,7 +964,7 @@ vnode_pager_generic_getpages(vp, m, bytecount, reqpage)
|
||||
* we just try to clear the piece that we couldn't
|
||||
* read.
|
||||
*/
|
||||
vm_page_set_valid(mt, 0,
|
||||
vm_page_set_valid_range(mt, 0,
|
||||
object->un_pager.vnp.vnp_size - tfoff);
|
||||
KASSERT((mt->dirty & vm_page_bits(0,
|
||||
object->un_pager.vnp.vnp_size - tfoff)) == 0,
|
||||
|
Loading…
x
Reference in New Issue
Block a user