Deleted Added
full compact
vnode_pager.c (46349) vnode_pager.c (46580)
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

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

33 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
34 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
35 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
36 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
37 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
38 * SUCH DAMAGE.
39 *
40 * from: @(#)vnode_pager.c 7.5 (Berkeley) 4/20/91
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

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

33 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
34 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
35 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
36 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
37 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
38 * SUCH DAMAGE.
39 *
40 * from: @(#)vnode_pager.c 7.5 (Berkeley) 4/20/91
41 * $Id: vnode_pager.c,v 1.107 1999/04/10 20:52:11 dt Exp $
41 * $Id: vnode_pager.c,v 1.108 1999/05/02 23:57:16 alc Exp $
42 */
43
44/*
45 * Page to/from files (vnodes).
46 */
47
48/*
49 * TODO:

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

404 fileaddr = vnode_pager_addr(vp,
405 IDX_TO_OFF(m->pindex) + i * bsize, (int *)0);
406 if (fileaddr != -1) {
407 bp = getpbuf(&vnode_pbuf_freecnt);
408
409 /* build a minimal buffer header */
410 bp->b_flags = B_BUSY | B_READ | B_CALL;
411 bp->b_iodone = vnode_pager_iodone;
42 */
43
44/*
45 * Page to/from files (vnodes).
46 */
47
48/*
49 * TODO:

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

404 fileaddr = vnode_pager_addr(vp,
405 IDX_TO_OFF(m->pindex) + i * bsize, (int *)0);
406 if (fileaddr != -1) {
407 bp = getpbuf(&vnode_pbuf_freecnt);
408
409 /* build a minimal buffer header */
410 bp->b_flags = B_BUSY | B_READ | B_CALL;
411 bp->b_iodone = vnode_pager_iodone;
412 bp->b_proc = curproc;
413 bp->b_rcred = bp->b_wcred = bp->b_proc->p_ucred;
412 bp->b_rcred = bp->b_wcred = curproc->p_ucred;
414 if (bp->b_rcred != NOCRED)
415 crhold(bp->b_rcred);
416 if (bp->b_wcred != NOCRED)
417 crhold(bp->b_wcred);
418 bp->b_data = (caddr_t) kva + i * bsize;
419 bp->b_blkno = fileaddr;
420 pbgetvp(dp, bp);
421 bp->b_bcount = bsize;

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

721 * and map the pages to be read into the kva
722 */
723 pmap_qenter(kva, m, count);
724
725 /* build a minimal buffer header */
726 bp->b_flags = B_BUSY | B_READ | B_CALL;
727 bp->b_iodone = vnode_pager_iodone;
728 /* B_PHYS is not set, but it is nice to fill this in */
413 if (bp->b_rcred != NOCRED)
414 crhold(bp->b_rcred);
415 if (bp->b_wcred != NOCRED)
416 crhold(bp->b_wcred);
417 bp->b_data = (caddr_t) kva + i * bsize;
418 bp->b_blkno = fileaddr;
419 pbgetvp(dp, bp);
420 bp->b_bcount = bsize;

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

720 * and map the pages to be read into the kva
721 */
722 pmap_qenter(kva, m, count);
723
724 /* build a minimal buffer header */
725 bp->b_flags = B_BUSY | B_READ | B_CALL;
726 bp->b_iodone = vnode_pager_iodone;
727 /* B_PHYS is not set, but it is nice to fill this in */
729 bp->b_proc = curproc;
730 bp->b_rcred = bp->b_wcred = bp->b_proc->p_ucred;
728 bp->b_rcred = bp->b_wcred = curproc->p_ucred;
731 if (bp->b_rcred != NOCRED)
732 crhold(bp->b_rcred);
733 if (bp->b_wcred != NOCRED)
734 crhold(bp->b_wcred);
735 bp->b_blkno = firstaddr;
736 pbgetvp(dp, bp);
737 bp->b_bcount = size;
738 bp->b_bufsize = size;

--- 242 unchanged lines hidden ---
729 if (bp->b_rcred != NOCRED)
730 crhold(bp->b_rcred);
731 if (bp->b_wcred != NOCRED)
732 crhold(bp->b_wcred);
733 bp->b_blkno = firstaddr;
734 pbgetvp(dp, bp);
735 bp->b_bcount = size;
736 bp->b_bufsize = size;

--- 242 unchanged lines hidden ---