vfs_cluster.c (cf2819ccb89e0dbc1ce096b99436dbe871cf6f0f) vfs_cluster.c (fd5d1124e25f9996b0bfbf17156d850d106b27b4)
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.61 1998/05/01 16:29:27 bde Exp $
36 * $Id: vfs_cluster.c,v 1.62 1998/05/21 07:47:42 dyson Exp $
37 */
38
39#include "opt_debug_cluster.h"
40
41#include <sys/param.h>
42#include <sys/systm.h>
43#include <sys/proc.h>
44#include <sys/buf.h>

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

245 if (bp) {
246#if defined(CLUSTERDEBUG)
247 if (rcluster)
248 printf("S(%d,%d,%d) ",
249 bp->b_lblkno, bp->b_bcount, seqcount);
250#endif
251 if ((bp->b_flags & B_CLUSTER) == 0)
252 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/proc.h>
44#include <sys/buf.h>

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

245 if (bp) {
246#if defined(CLUSTERDEBUG)
247 if (rcluster)
248 printf("S(%d,%d,%d) ",
249 bp->b_lblkno, bp->b_bcount, seqcount);
250#endif
251 if ((bp->b_flags & B_CLUSTER) == 0)
252 vfs_busy_pages(bp, 0);
253 error = VOP_STRATEGY(bp);
253 error = VOP_STRATEGY(vp, bp);
254 curproc->p_stats->p_ru.ru_inblock++;
255 }
256
257 /*
258 * and if we have read-aheads, do them too
259 */
260 if (rbp) {
261 if (error) {

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

277 rbp->b_lblkno, rbp->b_bcount,
278 rbp->b_lblkno - origblkno,
279 seqcount);
280 }
281#endif
282
283 if ((rbp->b_flags & B_CLUSTER) == 0)
284 vfs_busy_pages(rbp, 0);
254 curproc->p_stats->p_ru.ru_inblock++;
255 }
256
257 /*
258 * and if we have read-aheads, do them too
259 */
260 if (rbp) {
261 if (error) {

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

277 rbp->b_lblkno, rbp->b_bcount,
278 rbp->b_lblkno - origblkno,
279 seqcount);
280 }
281#endif
282
283 if ((rbp->b_flags & B_CLUSTER) == 0)
284 vfs_busy_pages(rbp, 0);
285 (void) VOP_STRATEGY(rbp);
285 (void) VOP_STRATEGY(vp, rbp);
286 curproc->p_stats->p_ru.ru_inblock++;
287 }
288 }
289 if (reqbp)
290 return (biowait(reqbp));
291 else
292 return (error);
293}

--- 554 unchanged lines hidden ---
286 curproc->p_stats->p_ru.ru_inblock++;
287 }
288 }
289 if (reqbp)
290 return (biowait(reqbp));
291 else
292 return (error);
293}

--- 554 unchanged lines hidden ---