Deleted Added
full compact
vfs_bio.c (30994) vfs_bio.c (31016)
1/*
2 * Copyright (c) 1994 John S. Dyson
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

13 * documentation and/or other materials provided with the distribution.
14 * 3. Absolutely no warranty of function or purpose is made by the author
15 * John S. Dyson.
16 * 4. This work was done expressly for inclusion into FreeBSD. Other use
17 * is allowed if this notation is included.
18 * 5. Modifications may be freely made to this file if the above conditions
19 * are met.
20 *
1/*
2 * Copyright (c) 1994 John S. Dyson
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

13 * documentation and/or other materials provided with the distribution.
14 * 3. Absolutely no warranty of function or purpose is made by the author
15 * John S. Dyson.
16 * 4. This work was done expressly for inclusion into FreeBSD. Other use
17 * is allowed if this notation is included.
18 * 5. Modifications may be freely made to this file if the above conditions
19 * are met.
20 *
21 * $Id: vfs_bio.c,v 1.132 1997/10/28 15:58:24 bde Exp $
21 * $Id: vfs_bio.c,v 1.133 1997/11/06 19:29:29 phk Exp $
22 */
23
24/*
25 * this file contains a new buffer I/O scheme implementing a coherent
26 * VM object and buffer cache scheme. Pains have been taken to make
27 * sure that the performance degradation associated with schemes such
28 * as this is not realized.
29 *

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

1273 */
1274struct buf *
1275getblk(struct vnode * vp, daddr_t blkno, int size, int slpflag, int slptimeo)
1276{
1277 struct buf *bp;
1278 int s;
1279 struct bufhashhdr *bh;
1280 int maxsize;
22 */
23
24/*
25 * this file contains a new buffer I/O scheme implementing a coherent
26 * VM object and buffer cache scheme. Pains have been taken to make
27 * sure that the performance degradation associated with schemes such
28 * as this is not realized.
29 *

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

1273 */
1274struct buf *
1275getblk(struct vnode * vp, daddr_t blkno, int size, int slpflag, int slptimeo)
1276{
1277 struct buf *bp;
1278 int s;
1279 struct bufhashhdr *bh;
1280 int maxsize;
1281 static pid_t flushing = 0;
1282
1283 if (vp->v_mount) {
1284 maxsize = vp->v_mount->mnt_stat.f_iosize;
1285 /*
1286 * This happens on mount points.
1287 */
1288 if (maxsize < size)
1289 maxsize = size;

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

2086 */
2087void
2088vfs_clean_pages(struct buf * bp)
2089{
2090 int i;
2091
2092 if (bp->b_flags & B_VMIO) {
2093 struct vnode *vp = bp->b_vp;
1281
1282 if (vp->v_mount) {
1283 maxsize = vp->v_mount->mnt_stat.f_iosize;
1284 /*
1285 * This happens on mount points.
1286 */
1287 if (maxsize < size)
1288 maxsize = size;

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

2085 */
2086void
2087vfs_clean_pages(struct buf * bp)
2088{
2089 int i;
2090
2091 if (bp->b_flags & B_VMIO) {
2092 struct vnode *vp = bp->b_vp;
2094 vm_object_t obj = vp->v_object;
2095 vm_ooffset_t foff;
2096
2097 if (vp->v_type == VBLK)
2098 foff = (vm_ooffset_t) DEV_BSIZE * bp->b_lblkno;
2099 else
2100 foff = (vm_ooffset_t) vp->v_mount->mnt_stat.f_iosize * bp->b_lblkno;
2101 for (i = 0; i < bp->b_npages; i++, foff += PAGE_SIZE) {
2102 vm_page_t m = bp->b_pages[i];

--- 149 unchanged lines hidden ---
2093 vm_ooffset_t foff;
2094
2095 if (vp->v_type == VBLK)
2096 foff = (vm_ooffset_t) DEV_BSIZE * bp->b_lblkno;
2097 else
2098 foff = (vm_ooffset_t) vp->v_mount->mnt_stat.f_iosize * bp->b_lblkno;
2099 for (i = 0; i < bp->b_npages; i++, foff += PAGE_SIZE) {
2100 vm_page_t m = bp->b_pages[i];

--- 149 unchanged lines hidden ---