vfs_bio.c (99986) | vfs_bio.c (100344) |
---|---|
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 99986 2002-07-14 19:45:46Z alc $ | 14 * $FreeBSD: head/sys/kern/vfs_bio.c 100344 2002-07-19 07:29:39Z mckusick $ |
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 * --- 1283 unchanged lines hidden (view full) --- 1306 return; 1307 } 1308 1309 /* enqueue */ 1310 1311 /* buffers with no memory */ 1312 if (bp->b_bufsize == 0) { 1313 bp->b_flags |= B_INVAL; | 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 * --- 1283 unchanged lines hidden (view full) --- 1306 return; 1307 } 1308 1309 /* enqueue */ 1310 1311 /* buffers with no memory */ 1312 if (bp->b_bufsize == 0) { 1313 bp->b_flags |= B_INVAL; |
1314 bp->b_xflags &= ~BX_BKGRDWRITE; | 1314 bp->b_xflags &= ~(BX_BKGRDWRITE | BX_ALTDATA); |
1315 if (bp->b_xflags & BX_BKGRDINPROG) 1316 panic("losing buffer 1"); 1317 if (bp->b_kvasize) { 1318 bp->b_qindex = QUEUE_EMPTYKVA; 1319 } else { 1320 bp->b_qindex = QUEUE_EMPTY; 1321 } 1322 TAILQ_INSERT_HEAD(&bufqueues[bp->b_qindex], bp, b_freelist); 1323#ifdef USE_BUFHASH 1324 LIST_REMOVE(bp, b_hash); 1325 LIST_INSERT_HEAD(&invalhash, bp, b_hash); 1326#endif 1327 bp->b_dev = NODEV; 1328 /* buffers with junk contents */ 1329 } else if (bp->b_flags & (B_INVAL | B_NOCACHE | B_RELBUF) || 1330 (bp->b_ioflags & BIO_ERROR)) { 1331 bp->b_flags |= B_INVAL; | 1315 if (bp->b_xflags & BX_BKGRDINPROG) 1316 panic("losing buffer 1"); 1317 if (bp->b_kvasize) { 1318 bp->b_qindex = QUEUE_EMPTYKVA; 1319 } else { 1320 bp->b_qindex = QUEUE_EMPTY; 1321 } 1322 TAILQ_INSERT_HEAD(&bufqueues[bp->b_qindex], bp, b_freelist); 1323#ifdef USE_BUFHASH 1324 LIST_REMOVE(bp, b_hash); 1325 LIST_INSERT_HEAD(&invalhash, bp, b_hash); 1326#endif 1327 bp->b_dev = NODEV; 1328 /* buffers with junk contents */ 1329 } else if (bp->b_flags & (B_INVAL | B_NOCACHE | B_RELBUF) || 1330 (bp->b_ioflags & BIO_ERROR)) { 1331 bp->b_flags |= B_INVAL; |
1332 bp->b_xflags &= ~BX_BKGRDWRITE; | 1332 bp->b_xflags &= ~(BX_BKGRDWRITE | BX_ALTDATA); |
1333 if (bp->b_xflags & BX_BKGRDINPROG) 1334 panic("losing buffer 2"); 1335 bp->b_qindex = QUEUE_CLEAN; 1336 TAILQ_INSERT_HEAD(&bufqueues[QUEUE_CLEAN], bp, b_freelist); 1337#ifdef USE_BUFHASH 1338 LIST_REMOVE(bp, b_hash); 1339 LIST_INSERT_HEAD(&invalhash, bp, b_hash); 1340#endif --- 2105 unchanged lines hidden --- | 1333 if (bp->b_xflags & BX_BKGRDINPROG) 1334 panic("losing buffer 2"); 1335 bp->b_qindex = QUEUE_CLEAN; 1336 TAILQ_INSERT_HEAD(&bufqueues[QUEUE_CLEAN], bp, b_freelist); 1337#ifdef USE_BUFHASH 1338 LIST_REMOVE(bp, b_hash); 1339 LIST_INSERT_HEAD(&invalhash, bp, b_hash); 1340#endif --- 2105 unchanged lines hidden --- |