Deleted Added
full compact
vnode_pager.c (136927) vnode_pager.c (136966)
1/*
2 * Copyright (c) 1990 University of Utah.
3 * Copyright (c) 1991 The Regents of the University of California.
4 * All rights reserved.
5 * Copyright (c) 1993, 1994 John S. Dyson
6 * Copyright (c) 1995, David Greenman
7 *
8 * This code is derived from software contributed to Berkeley by

--- 37 unchanged lines hidden (view full) ---

46
47/*
48 * TODO:
49 * Implement VOP_GETPAGES/PUTPAGES interface for filesystems. Will
50 * greatly re-simplify the vnode_pager.
51 */
52
53#include <sys/cdefs.h>
1/*
2 * Copyright (c) 1990 University of Utah.
3 * Copyright (c) 1991 The Regents of the University of California.
4 * All rights reserved.
5 * Copyright (c) 1993, 1994 John S. Dyson
6 * Copyright (c) 1995, David Greenman
7 *
8 * This code is derived from software contributed to Berkeley by

--- 37 unchanged lines hidden (view full) ---

46
47/*
48 * TODO:
49 * Implement VOP_GETPAGES/PUTPAGES interface for filesystems. Will
50 * greatly re-simplify the vnode_pager.
51 */
52
53#include <sys/cdefs.h>
54__FBSDID("$FreeBSD: head/sys/vm/vnode_pager.c 136927 2004-10-24 20:03:41Z phk $");
54__FBSDID("$FreeBSD: head/sys/vm/vnode_pager.c 136966 2004-10-26 07:39:12Z phk $");
55
56#include <sys/param.h>
57#include <sys/systm.h>
58#include <sys/proc.h>
59#include <sys/vnode.h>
60#include <sys/mount.h>
61#include <sys/bio.h>
62#include <sys/buf.h>

--- 730 unchanged lines hidden (view full) ---

793 if ((foff + size) > object->un_pager.vnp.vnp_size)
794 size = object->un_pager.vnp.vnp_size - foff;
795 KASSERT(size > 0, ("zero size"));
796
797 /*
798 * round up physical size for real devices.
799 */
800 if (dp->v_type == VBLK || dp->v_type == VCHR) {
55
56#include <sys/param.h>
57#include <sys/systm.h>
58#include <sys/proc.h>
59#include <sys/vnode.h>
60#include <sys/mount.h>
61#include <sys/bio.h>
62#include <sys/buf.h>

--- 730 unchanged lines hidden (view full) ---

793 if ((foff + size) > object->un_pager.vnp.vnp_size)
794 size = object->un_pager.vnp.vnp_size - foff;
795 KASSERT(size > 0, ("zero size"));
796
797 /*
798 * round up physical size for real devices.
799 */
800 if (dp->v_type == VBLK || dp->v_type == VCHR) {
801 int secmask = dp->v_rdev->si_bsize_phys - 1;
801 int secmask = dp->v_bufobj.bo_bsize - 1;
802 KASSERT(secmask < PAGE_SIZE, ("vnode_pager_generic_getpages: sector size %d too large\n", secmask + 1));
803 size = (size + secmask) & ~secmask;
804 }
805
806 bp = getpbuf(&vnode_pbuf_freecnt);
807 kva = (vm_offset_t) bp->b_data;
808
809 /*

--- 326 unchanged lines hidden ---
802 KASSERT(secmask < PAGE_SIZE, ("vnode_pager_generic_getpages: sector size %d too large\n", secmask + 1));
803 size = (size + secmask) & ~secmask;
804 }
805
806 bp = getpbuf(&vnode_pbuf_freecnt);
807 kva = (vm_offset_t) bp->b_data;
808
809 /*

--- 326 unchanged lines hidden ---