Date: Wed, 30 Nov 2011 17:39:00 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r228156 - in head/sys: fs/nfsclient fs/nwfs fs/smbfs kern nfsclient vm Message-ID: <201111301739.pAUHd1o4007388@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Wed Nov 30 17:39:00 2011 New Revision: 228156 URL: http://svn.freebsd.org/changeset/base/228156 Log: 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 Modified: head/sys/fs/nfsclient/nfs_clbio.c head/sys/fs/nwfs/nwfs_io.c head/sys/fs/smbfs/smbfs_io.c head/sys/kern/uipc_shm.c head/sys/kern/vfs_bio.c head/sys/nfsclient/nfs_bio.c head/sys/vm/vm_page.c head/sys/vm/vm_page.h head/sys/vm/vnode_pager.c Modified: head/sys/fs/nfsclient/nfs_clbio.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clbio.c Wed Nov 30 17:36:01 2011 (r228155) +++ head/sys/fs/nfsclient/nfs_clbio.c Wed Nov 30 17:39:00 2011 (r228156) @@ -211,7 +211,7 @@ ncl_getpages(struct vop_getpages_args *a * 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 { Modified: head/sys/fs/nwfs/nwfs_io.c ============================================================================== --- head/sys/fs/nwfs/nwfs_io.c Wed Nov 30 17:36:01 2011 (r228155) +++ head/sys/fs/nwfs/nwfs_io.c Wed Nov 30 17:39:00 2011 (r228156) @@ -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)); } Modified: head/sys/fs/smbfs/smbfs_io.c ============================================================================== --- head/sys/fs/smbfs/smbfs_io.c Wed Nov 30 17:36:01 2011 (r228155) +++ head/sys/fs/smbfs/smbfs_io.c Wed Nov 30 17:39:00 2011 (r228156) @@ -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 { Modified: head/sys/kern/uipc_shm.c ============================================================================== --- head/sys/kern/uipc_shm.c Wed Nov 30 17:36:01 2011 (r228155) +++ head/sys/kern/uipc_shm.c Wed Nov 30 17:39:00 2011 (r228156) @@ -301,7 +301,7 @@ shm_dotruncate(struct shmfd *shmfd, off_ * 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 Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Wed Nov 30 17:36:01 2011 (r228155) +++ head/sys/kern/vfs_bio.c Wed Nov 30 17:39:00 2011 (r228156) @@ -3499,7 +3499,7 @@ vfs_page_set_valid(struct buf *bp, vm_oo * 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 ba 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; Modified: head/sys/nfsclient/nfs_bio.c ============================================================================== --- head/sys/nfsclient/nfs_bio.c Wed Nov 30 17:36:01 2011 (r228155) +++ head/sys/nfsclient/nfs_bio.c Wed Nov 30 17:39:00 2011 (r228156) @@ -206,7 +206,7 @@ nfs_getpages(struct vop_getpages_args *a * 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 { Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Wed Nov 30 17:36:01 2011 (r228155) +++ head/sys/vm/vm_page.c Wed Nov 30 17:39:00 2011 (r228156) @@ -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, * 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. Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Wed Nov 30 17:36:01 2011 (r228155) +++ head/sys/vm/vm_page.h Wed Nov 30 17:39:00 2011 (r228156) @@ -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); Modified: head/sys/vm/vnode_pager.c ============================================================================== --- head/sys/vm/vnode_pager.c Wed Nov 30 17:36:01 2011 (r228155) +++ head/sys/vm/vnode_pager.c Wed Nov 30 17:39:00 2011 (r228156) @@ -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, byte * 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,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111301739.pAUHd1o4007388>