Deleted Added
full compact
vfs_vnops.c (88149) vfs_vnops.c (89306)
1/*
2 * Copyright (c) 1982, 1986, 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

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

31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)vfs_vnops.c 8.2 (Berkeley) 1/21/94
1/*
2 * Copyright (c) 1982, 1986, 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

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

31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)vfs_vnops.c 8.2 (Berkeley) 1/21/94
39 * $FreeBSD: head/sys/kern/vfs_vnops.c 88149 2001-12-18 20:48:54Z dillon $
39 * $FreeBSD: head/sys/kern/vfs_vnops.c 89306 2002-01-13 11:58:06Z alfred $
40 */
41
42#include <sys/param.h>
43#include <sys/systm.h>
44#include <sys/fcntl.h>
45#include <sys/file.h>
46#include <sys/stat.h>
47#include <sys/proc.h>

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

260 vrele(vp);
261 return (error);
262}
263
264static __inline
265int
266sequential_heuristic(struct uio *uio, struct file *fp)
267{
40 */
41
42#include <sys/param.h>
43#include <sys/systm.h>
44#include <sys/fcntl.h>
45#include <sys/file.h>
46#include <sys/stat.h>
47#include <sys/proc.h>

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

260 vrele(vp);
261 return (error);
262}
263
264static __inline
265int
266sequential_heuristic(struct uio *uio, struct file *fp)
267{
268
268 /*
269 * Sequential heuristic - detect sequential operation
270 */
271 if ((uio->uio_offset == 0 && fp->f_seqcount > 0) ||
272 uio->uio_offset == fp->f_nextoff) {
273 /*
274 * XXX we assume that the filesystem block size is
275 * the default. Not true, but still gives us a pretty

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

441 struct mount *mp;
442 int error, ioflag;
443
444 KASSERT(uio->uio_td == td, ("uio_td %p is not td %p",
445 uio->uio_td, td));
446 vp = (struct vnode *)fp->f_data;
447 if (vp->v_type == VREG)
448 bwillwrite();
269 /*
270 * Sequential heuristic - detect sequential operation
271 */
272 if ((uio->uio_offset == 0 && fp->f_seqcount > 0) ||
273 uio->uio_offset == fp->f_nextoff) {
274 /*
275 * XXX we assume that the filesystem block size is
276 * the default. Not true, but still gives us a pretty

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

442 struct mount *mp;
443 int error, ioflag;
444
445 KASSERT(uio->uio_td == td, ("uio_td %p is not td %p",
446 uio->uio_td, td));
447 vp = (struct vnode *)fp->f_data;
448 if (vp->v_type == VREG)
449 bwillwrite();
449 vp = (struct vnode *)fp->f_data; /* XXX needed? */
450 ioflag = IO_UNIT;
451 if (vp->v_type == VREG && (fp->f_flag & O_APPEND))
452 ioflag |= IO_APPEND;
453 if (fp->f_flag & FNONBLOCK)
454 ioflag |= IO_NDELAY;
455 if (fp->f_flag & O_DIRECT)
456 ioflag |= IO_DIRECT;
457 if ((fp->f_flag & O_FSYNC) ||

--- 522 unchanged lines hidden ---
450 ioflag = IO_UNIT;
451 if (vp->v_type == VREG && (fp->f_flag & O_APPEND))
452 ioflag |= IO_APPEND;
453 if (fp->f_flag & FNONBLOCK)
454 ioflag |= IO_NDELAY;
455 if (fp->f_flag & O_DIRECT)
456 ioflag |= IO_DIRECT;
457 if ((fp->f_flag & O_FSYNC) ||

--- 522 unchanged lines hidden ---