Deleted Added
full compact
vfs_bio.c (109572) vfs_bio.c (109623)
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 109572 2003-01-20 17:46:48Z dillon $
14 * $FreeBSD: head/sys/kern/vfs_bio.c 109623 2003-01-21 08:56:16Z alfred $
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 *

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

2636 * We only use malloced memory on the first allocation.
2637 * and revert to page-allocated memory when the buffer
2638 * grows.
2639 */
2640 if ( (bufmallocspace < maxbufmallocspace) &&
2641 (bp->b_bufsize == 0) &&
2642 (mbsize <= PAGE_SIZE/2)) {
2643
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 *

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

2636 * We only use malloced memory on the first allocation.
2637 * and revert to page-allocated memory when the buffer
2638 * grows.
2639 */
2640 if ( (bufmallocspace < maxbufmallocspace) &&
2641 (bp->b_bufsize == 0) &&
2642 (mbsize <= PAGE_SIZE/2)) {
2643
2644 bp->b_data = malloc(mbsize, M_BIOBUF, M_WAITOK);
2644 bp->b_data = malloc(mbsize, M_BIOBUF, 0);
2645 bp->b_bufsize = mbsize;
2646 bp->b_bcount = size;
2647 bp->b_flags |= B_MALLOC;
2648 bufmallocspace += mbsize;
2649 return 1;
2650 }
2651 origbuf = NULL;
2652 origbufsize = 0;

--- 1027 unchanged lines hidden ---
2645 bp->b_bufsize = mbsize;
2646 bp->b_bcount = size;
2647 bp->b_flags |= B_MALLOC;
2648 bufmallocspace += mbsize;
2649 return 1;
2650 }
2651 origbuf = NULL;
2652 origbufsize = 0;

--- 1027 unchanged lines hidden ---