Deleted Added
full compact
swap_pager.c (58934) swap_pager.c (59249)
1/*
2 * Copyright (c) 1998 Matthew Dillon,
3 * Copyright (c) 1994 John S. Dyson
4 * Copyright (c) 1990 University of Utah.
5 * Copyright (c) 1991, 1993
6 * The Regents of the University of California. All rights reserved.
7 *
8 * This code is derived from software contributed to Berkeley by

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

59 * cycled (in a high-load system) by the pager. We also do on-the-fly
60 * removal of invalidated swap blocks when a page is destroyed
61 * or renamed.
62 *
63 * from: Utah $Hdr: swap_pager.c 1.4 91/04/30$
64 *
65 * @(#)swap_pager.c 8.9 (Berkeley) 3/21/94
66 *
1/*
2 * Copyright (c) 1998 Matthew Dillon,
3 * Copyright (c) 1994 John S. Dyson
4 * Copyright (c) 1990 University of Utah.
5 * Copyright (c) 1991, 1993
6 * The Regents of the University of California. All rights reserved.
7 *
8 * This code is derived from software contributed to Berkeley by

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

59 * cycled (in a high-load system) by the pager. We also do on-the-fly
60 * removal of invalidated swap blocks when a page is destroyed
61 * or renamed.
62 *
63 * from: Utah $Hdr: swap_pager.c 1.4 91/04/30$
64 *
65 * @(#)swap_pager.c 8.9 (Berkeley) 3/21/94
66 *
67 * $FreeBSD: head/sys/vm/swap_pager.c 58934 2000-04-02 15:24:56Z phk $
67 * $FreeBSD: head/sys/vm/swap_pager.c 59249 2000-04-15 05:54:02Z phk $
68 */
69
70#include <sys/param.h>
71#include <sys/systm.h>
72#include <sys/conf.h>
73#include <sys/kernel.h>
74#include <sys/proc.h>
75#include <sys/buf.h>

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

821 int s;
822 char *data;
823 struct buf *nbp = NULL;
824
825 if (bp->b_bcount & PAGE_MASK) {
826 bp->b_error = EINVAL;
827 bp->b_ioflags |= BIO_ERROR;
828 bp->b_flags |= B_INVAL;
68 */
69
70#include <sys/param.h>
71#include <sys/systm.h>
72#include <sys/conf.h>
73#include <sys/kernel.h>
74#include <sys/proc.h>
75#include <sys/buf.h>

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

821 int s;
822 char *data;
823 struct buf *nbp = NULL;
824
825 if (bp->b_bcount & PAGE_MASK) {
826 bp->b_error = EINVAL;
827 bp->b_ioflags |= BIO_ERROR;
828 bp->b_flags |= B_INVAL;
829 biodone(bp);
829 bufdone(bp);
830 printf("swap_pager_strategy: bp %p b_vp %p blk %d size %d, not page bounded\n", bp, bp->b_vp, (int)bp->b_pblkno, (int)bp->b_bcount);
831 return;
832 }
833
834 /*
835 * Clear error indication, initialize page index, count, data pointer.
836 */
837

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

852 if (bp->b_iocmd == BIO_DELETE) {
853 /*
854 * FREE PAGE(s) - destroy underlying swap that is no longer
855 * needed.
856 */
857 swp_pager_meta_free(object, start, count);
858 splx(s);
859 bp->b_resid = 0;
830 printf("swap_pager_strategy: bp %p b_vp %p blk %d size %d, not page bounded\n", bp, bp->b_vp, (int)bp->b_pblkno, (int)bp->b_bcount);
831 return;
832 }
833
834 /*
835 * Clear error indication, initialize page index, count, data pointer.
836 */
837

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

852 if (bp->b_iocmd == BIO_DELETE) {
853 /*
854 * FREE PAGE(s) - destroy underlying swap that is no longer
855 * needed.
856 */
857 swp_pager_meta_free(object, start, count);
858 splx(s);
859 bp->b_resid = 0;
860 biodone(bp);
860 bufdone(bp);
861 return;
862 }
863
864 /*
865 * Execute read or write
866 */
867
868 while (count > 0) {

--- 1084 unchanged lines hidden ---
861 return;
862 }
863
864 /*
865 * Execute read or write
866 */
867
868 while (count > 0) {

--- 1084 unchanged lines hidden ---