vfs_bio.c (59761) | vfs_bio.c (59762) |
---|---|
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 59761 2000-04-29 16:14:10Z phk $ | 14 * $FreeBSD: head/sys/kern/vfs_bio.c 59762 2000-04-29 16:25:22Z 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 * --- 445 unchanged lines hidden (view full) --- 468 bp->b_ioflags &= ~BIO_ERROR; 469 if (bp->b_rcred == NOCRED) { 470 if (cred != NOCRED) 471 crhold(cred); 472 bp->b_rcred = cred; 473 } 474 vfs_busy_pages(bp, 0); 475 VOP_STRATEGY(vp, bp); | 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 * --- 445 unchanged lines hidden (view full) --- 468 bp->b_ioflags &= ~BIO_ERROR; 469 if (bp->b_rcred == NOCRED) { 470 if (cred != NOCRED) 471 crhold(cred); 472 bp->b_rcred = cred; 473 } 474 vfs_busy_pages(bp, 0); 475 VOP_STRATEGY(vp, bp); |
476 return (biowait(bp)); | 476 return (bufwait(bp)); |
477 } 478 return (0); 479} 480 481/* 482 * Operates like bread, but also starts asynchronous I/O on 483 * read-ahead blocks. We must clear BIO_ERROR and B_INVAL prior 484 * to initiating I/O . If B_CACHE is set, the buffer is valid --- 48 unchanged lines hidden (view full) --- 533 BUF_KERNPROC(rabp); 534 VOP_STRATEGY(vp, rabp); 535 } else { 536 brelse(rabp); 537 } 538 } 539 540 if (readwait) { | 477 } 478 return (0); 479} 480 481/* 482 * Operates like bread, but also starts asynchronous I/O on 483 * read-ahead blocks. We must clear BIO_ERROR and B_INVAL prior 484 * to initiating I/O . If B_CACHE is set, the buffer is valid --- 48 unchanged lines hidden (view full) --- 533 BUF_KERNPROC(rabp); 534 VOP_STRATEGY(vp, rabp); 535 } else { 536 brelse(rabp); 537 } 538 } 539 540 if (readwait) { |
541 rv = biowait(bp); | 541 rv = bufwait(bp); |
542 } 543 return (rv); 544} 545 546/* 547 * Write, release buffer on completion. (Done by iodone 548 * if async). Do not bother writing anything if the buffer 549 * is invalid. --- 92 unchanged lines hidden (view full) --- 642 if (curproc != NULL) 643 curproc->p_stats->p_ru.ru_oublock++; 644 splx(s); 645 if (oldflags & B_ASYNC) 646 BUF_KERNPROC(bp); 647 BUF_STRATEGY(bp); 648 649 if ((oldflags & B_ASYNC) == 0) { | 542 } 543 return (rv); 544} 545 546/* 547 * Write, release buffer on completion. (Done by iodone 548 * if async). Do not bother writing anything if the buffer 549 * is invalid. --- 92 unchanged lines hidden (view full) --- 642 if (curproc != NULL) 643 curproc->p_stats->p_ru.ru_oublock++; 644 splx(s); 645 if (oldflags & B_ASYNC) 646 BUF_KERNPROC(bp); 647 BUF_STRATEGY(bp); 648 649 if ((oldflags & B_ASYNC) == 0) { |
650 int rtval = biowait(bp); | 650 int rtval = bufwait(bp); |
651 brelse(bp); 652 return (rtval); 653 } 654 655 return (0); 656} 657 658/* --- 2520 unchanged lines hidden --- | 651 brelse(bp); 652 return (rtval); 653 } 654 655 return (0); 656} 657 658/* --- 2520 unchanged lines hidden --- |