vfs_bio.c (55697) | vfs_bio.c (55756) |
---|---|
1/* 2 * Copyright (c) 1994,1997 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 9 * notice immediately at the beginning of the file, without modification, 10 * this list of conditions, and the following disclaimer. 11 * 2. Absolutely no warranty of function or purpose is made by the author 12 * John S. Dyson. 13 * | 1/* 2 * Copyright (c) 1994,1997 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 9 * notice immediately at the beginning of the file, without modification, 10 * this list of conditions, and the following disclaimer. 11 * 2. Absolutely no warranty of function or purpose is made by the author 12 * John S. Dyson. 13 * |
14 * $FreeBSD: head/sys/kern/vfs_bio.c 55697 2000-01-10 00:24:24Z mckusick $ | 14 * $FreeBSD: head/sys/kern/vfs_bio.c 55756 2000-01-10 12:04:27Z phk $ |
15 */ 16 17/* 18 * this file contains a new buffer I/O scheme implementing a coherent 19 * VM object and buffer cache scheme. Pains have been taken to make 20 * sure that the performance degradation associated with schemes such 21 * as this is not realized. 22 * --- 988 unchanged lines hidden (view full) --- 1011 * the buffer is an NFS buffer, it is tracking piecemeal writes or 1012 * the commit state and we cannot afford to lose the buffer. If the 1013 * buffer has a background write in progress, we need to keep it 1014 * around to prevent it from being reconstituted and starting a second 1015 * background write. 1016 */ 1017 if ((bp->b_flags & B_VMIO) 1018 && !(bp->b_vp->v_tag == VT_NFS && | 15 */ 16 17/* 18 * this file contains a new buffer I/O scheme implementing a coherent 19 * VM object and buffer cache scheme. Pains have been taken to make 20 * sure that the performance degradation associated with schemes such 21 * as this is not realized. 22 * --- 988 unchanged lines hidden (view full) --- 1011 * the buffer is an NFS buffer, it is tracking piecemeal writes or 1012 * the commit state and we cannot afford to lose the buffer. If the 1013 * buffer has a background write in progress, we need to keep it 1014 * around to prevent it from being reconstituted and starting a second 1015 * background write. 1016 */ 1017 if ((bp->b_flags & B_VMIO) 1018 && !(bp->b_vp->v_tag == VT_NFS && |
1019 !vn_isdisk(bp->b_vp) && | 1019 !vn_isdisk(bp->b_vp, NULL) && |
1020 (bp->b_flags & B_DELWRI) && 1021 (bp->b_xflags & BX_BKGRDINPROG)) 1022 ) { 1023 1024 int i, j, resid; 1025 vm_page_t m; 1026 off_t foff; 1027 vm_pindex_t poff; --- 1197 unchanged lines hidden (view full) --- 2225 /* 2226 * Buffer is not in-core, create new buffer. The buffer 2227 * returned by getnewbuf() is locked. Note that the returned 2228 * buffer is also considered valid (not marked B_INVAL). 2229 */ 2230 int bsize, maxsize, vmio; 2231 off_t offset; 2232 | 1020 (bp->b_flags & B_DELWRI) && 1021 (bp->b_xflags & BX_BKGRDINPROG)) 1022 ) { 1023 1024 int i, j, resid; 1025 vm_page_t m; 1026 off_t foff; 1027 vm_pindex_t poff; --- 1197 unchanged lines hidden (view full) --- 2225 /* 2226 * Buffer is not in-core, create new buffer. The buffer 2227 * returned by getnewbuf() is locked. Note that the returned 2228 * buffer is also considered valid (not marked B_INVAL). 2229 */ 2230 int bsize, maxsize, vmio; 2231 off_t offset; 2232 |
2233 if (vn_isdisk(vp)) | 2233 if (vn_isdisk(vp, NULL)) |
2234 bsize = DEV_BSIZE; 2235 else if (vp->v_mountedhere) 2236 bsize = vp->v_mountedhere->mnt_stat.f_iosize; 2237 else if (vp->v_mount) 2238 bsize = vp->v_mount->mnt_stat.f_iosize; 2239 else 2240 bsize = size; 2241 --- 570 unchanged lines hidden (view full) --- 2812 if (m->busy == 0) { 2813#if !defined(MAX_PERF) 2814 printf("biodone: page busy < 0, " 2815 "pindex: %d, foff: 0x(%x,%x), " 2816 "resid: %d, index: %d\n", 2817 (int) m->pindex, (int)(foff >> 32), 2818 (int) foff & 0xffffffff, resid, i); 2819#endif | 2234 bsize = DEV_BSIZE; 2235 else if (vp->v_mountedhere) 2236 bsize = vp->v_mountedhere->mnt_stat.f_iosize; 2237 else if (vp->v_mount) 2238 bsize = vp->v_mount->mnt_stat.f_iosize; 2239 else 2240 bsize = size; 2241 --- 570 unchanged lines hidden (view full) --- 2812 if (m->busy == 0) { 2813#if !defined(MAX_PERF) 2814 printf("biodone: page busy < 0, " 2815 "pindex: %d, foff: 0x(%x,%x), " 2816 "resid: %d, index: %d\n", 2817 (int) m->pindex, (int)(foff >> 32), 2818 (int) foff & 0xffffffff, resid, i); 2819#endif |
2820 if (!vn_isdisk(vp)) | 2820 if (!vn_isdisk(vp, NULL)) |
2821#if !defined(MAX_PERF) 2822 printf(" iosize: %ld, lblkno: %d, flags: 0x%lx, npages: %d\n", 2823 bp->b_vp->v_mount->mnt_stat.f_iosize, 2824 (int) bp->b_lblkno, 2825 bp->b_flags, bp->b_npages); 2826 else 2827 printf(" VDEV, lblkno: %d, flags: 0x%lx, npages: %d\n", 2828 (int) bp->b_lblkno, --- 411 unchanged lines hidden --- | 2821#if !defined(MAX_PERF) 2822 printf(" iosize: %ld, lblkno: %d, flags: 0x%lx, npages: %d\n", 2823 bp->b_vp->v_mount->mnt_stat.f_iosize, 2824 (int) bp->b_lblkno, 2825 bp->b_flags, bp->b_npages); 2826 else 2827 printf(" VDEV, lblkno: %d, flags: 0x%lx, npages: %d\n", 2828 (int) bp->b_lblkno, --- 411 unchanged lines hidden --- |