vfs_cluster.c (44679) | vfs_cluster.c (46349) |
---|---|
1/*- 2 * Copyright (c) 1993 3 * The Regents of the University of California. All rights reserved. 4 * Modifications/enhancements: 5 * Copyright (c) 1995 John S. Dyson. All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 19 unchanged lines hidden (view full) --- 28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * SUCH DAMAGE. 34 * 35 * @(#)vfs_cluster.c 8.7 (Berkeley) 2/13/94 | 1/*- 2 * Copyright (c) 1993 3 * The Regents of the University of California. All rights reserved. 4 * Modifications/enhancements: 5 * Copyright (c) 1995 John S. Dyson. All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 19 unchanged lines hidden (view full) --- 28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * SUCH DAMAGE. 34 * 35 * @(#)vfs_cluster.c 8.7 (Berkeley) 2/13/94 |
36 * $Id: vfs_cluster.c,v 1.79 1999/01/27 21:49:58 dillon Exp $ | 36 * $Id: vfs_cluster.c,v 1.80 1999/03/12 02:24:56 julian Exp $ |
37 */ 38 39#include "opt_debug_cluster.h" 40 41#include <sys/param.h> 42#include <sys/systm.h> 43#include <sys/kernel.h> 44#include <sys/proc.h> --- 201 unchanged lines hidden (view full) --- 246 if (bp) { 247#if defined(CLUSTERDEBUG) 248 if (rcluster) 249 printf("S(%ld,%ld,%d) ", 250 (long)bp->b_lblkno, bp->b_bcount, seqcount); 251#endif 252 if ((bp->b_flags & B_CLUSTER) == 0) 253 vfs_busy_pages(bp, 0); | 37 */ 38 39#include "opt_debug_cluster.h" 40 41#include <sys/param.h> 42#include <sys/systm.h> 43#include <sys/kernel.h> 44#include <sys/proc.h> --- 201 unchanged lines hidden (view full) --- 246 if (bp) { 247#if defined(CLUSTERDEBUG) 248 if (rcluster) 249 printf("S(%ld,%ld,%d) ", 250 (long)bp->b_lblkno, bp->b_bcount, seqcount); 251#endif 252 if ((bp->b_flags & B_CLUSTER) == 0) 253 vfs_busy_pages(bp, 0); |
254 bp->b_flags &= ~(B_ERROR|B_INVAL); |
|
254 error = VOP_STRATEGY(vp, bp); 255 curproc->p_stats->p_ru.ru_inblock++; 256 } 257 258 /* 259 * and if we have read-aheads, do them too 260 */ 261 if (rbp) { --- 16 unchanged lines hidden (view full) --- 278 (long)rbp->b_lblkno, rbp->b_bcount, 279 (long)(rbp->b_lblkno - origblkno), 280 seqcount); 281 } 282#endif 283 284 if ((rbp->b_flags & B_CLUSTER) == 0) 285 vfs_busy_pages(rbp, 0); | 255 error = VOP_STRATEGY(vp, bp); 256 curproc->p_stats->p_ru.ru_inblock++; 257 } 258 259 /* 260 * and if we have read-aheads, do them too 261 */ 262 if (rbp) { --- 16 unchanged lines hidden (view full) --- 279 (long)rbp->b_lblkno, rbp->b_bcount, 280 (long)(rbp->b_lblkno - origblkno), 281 seqcount); 282 } 283#endif 284 285 if ((rbp->b_flags & B_CLUSTER) == 0) 286 vfs_busy_pages(rbp, 0); |
287 rbp->b_flags &= ~(B_ERROR|B_INVAL); |
|
286 (void) VOP_STRATEGY(vp, rbp); 287 curproc->p_stats->p_ru.ru_inblock++; 288 } 289 } 290 if (reqbp) 291 return (biowait(reqbp)); 292 else 293 return (error); --- 174 unchanged lines hidden (view full) --- 468 * buffers and mark IO as done on these. 469 */ 470 for (tbp = TAILQ_FIRST(&bp->b_cluster.cluster_head); 471 tbp; tbp = nbp) { 472 nbp = TAILQ_NEXT(&tbp->b_cluster, cluster_entry); 473 if (error) { 474 tbp->b_flags |= B_ERROR; 475 tbp->b_error = error; | 288 (void) VOP_STRATEGY(vp, rbp); 289 curproc->p_stats->p_ru.ru_inblock++; 290 } 291 } 292 if (reqbp) 293 return (biowait(reqbp)); 294 else 295 return (error); --- 174 unchanged lines hidden (view full) --- 470 * buffers and mark IO as done on these. 471 */ 472 for (tbp = TAILQ_FIRST(&bp->b_cluster.cluster_head); 473 tbp; tbp = nbp) { 474 nbp = TAILQ_NEXT(&tbp->b_cluster, cluster_entry); 475 if (error) { 476 tbp->b_flags |= B_ERROR; 477 tbp->b_error = error; |
476 } else 477 tbp->b_dirtyoff = tbp->b_dirtyend = 0; | 478 } else { 479 tbp->b_dirtyoff = tbp->b_dirtyend = 0; 480 tbp->b_flags &= ~(B_ERROR|B_INVAL); 481 } |
478 biodone(tbp); 479 } 480 relpbuf(bp, &cluster_pbuf_freecnt); 481} 482 483/* 484 * Do clustered write for FFS. 485 * --- 355 unchanged lines hidden --- | 482 biodone(tbp); 483 } 484 relpbuf(bp, &cluster_pbuf_freecnt); 485} 486 487/* 488 * Do clustered write for FFS. 489 * --- 355 unchanged lines hidden --- |