Deleted Added
full compact
vfs_cluster.c (38299) vfs_cluster.c (38517)
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.67 1998/08/06 08:33:18 dfr Exp $
36 * $Id: vfs_cluster.c,v 1.68 1998/08/13 08:09:07 dfr 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>

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

412 break;
413 }
414 }
415 TAILQ_INSERT_TAIL(&bp->b_cluster.cluster_head,
416 tbp, b_cluster.cluster_entry);
417 for (j = 0; j < tbp->b_npages; j += 1) {
418 vm_page_t m;
419 m = tbp->b_pages[j];
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>

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

412 break;
413 }
414 }
415 TAILQ_INSERT_TAIL(&bp->b_cluster.cluster_head,
416 tbp, b_cluster.cluster_entry);
417 for (j = 0; j < tbp->b_npages; j += 1) {
418 vm_page_t m;
419 m = tbp->b_pages[j];
420 s = splvm();
421 ++m->busy;
422 ++m->object->paging_in_progress;
423 splx(s);
420 PAGE_BUSY(m);
421 vm_object_pip_add(m->object, 1);
424 if ((bp->b_npages == 0) ||
425 (bp->b_pages[bp->b_npages-1] != m)) {
426 bp->b_pages[bp->b_npages] = m;
427 bp->b_npages++;
428 }
429 if ((m->valid & VM_PAGE_BITS_ALL) == VM_PAGE_BITS_ALL)
430 tbp->b_pages[j] = bogus_page;
431 }

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

779 m = tbp->b_pages[j];
780 if (m->flags & PG_BUSY)
781 goto finishcluster;
782 }
783 }
784
785 for (j = 0; j < tbp->b_npages; j += 1) {
786 m = tbp->b_pages[j];
422 if ((bp->b_npages == 0) ||
423 (bp->b_pages[bp->b_npages-1] != m)) {
424 bp->b_pages[bp->b_npages] = m;
425 bp->b_npages++;
426 }
427 if ((m->valid & VM_PAGE_BITS_ALL) == VM_PAGE_BITS_ALL)
428 tbp->b_pages[j] = bogus_page;
429 }

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

777 m = tbp->b_pages[j];
778 if (m->flags & PG_BUSY)
779 goto finishcluster;
780 }
781 }
782
783 for (j = 0; j < tbp->b_npages; j += 1) {
784 m = tbp->b_pages[j];
787 s = splvm();
788 ++m->busy;
789 ++m->object->paging_in_progress;
790 splx(s);
785 PAGE_BUSY(m);
786 vm_object_pip_add(m->object, 1);
791 if ((bp->b_npages == 0) ||
792 (bp->b_pages[bp->b_npages - 1] != m)) {
793 bp->b_pages[bp->b_npages] = m;
794 bp->b_npages++;
795 }
796 }
797 }
798 bp->b_bcount += size;

--- 57 unchanged lines hidden ---
787 if ((bp->b_npages == 0) ||
788 (bp->b_pages[bp->b_npages - 1] != m)) {
789 bp->b_pages[bp->b_npages] = m;
790 bp->b_npages++;
791 }
792 }
793 }
794 bp->b_bcount += size;

--- 57 unchanged lines hidden ---