Deleted Added
full compact
vfs_cluster.c (156927) vfs_cluster.c (162649)
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

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

27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE.
30 *
31 * @(#)vfs_cluster.c 8.7 (Berkeley) 2/13/94
32 */
33
34#include <sys/cdefs.h>
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

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

27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE.
30 *
31 * @(#)vfs_cluster.c 8.7 (Berkeley) 2/13/94
32 */
33
34#include <sys/cdefs.h>
35__FBSDID("$FreeBSD: head/sys/kern/vfs_cluster.c 156927 2006-03-21 01:04:24Z tegge $");
35__FBSDID("$FreeBSD: head/sys/kern/vfs_cluster.c 162649 2006-09-26 04:15:59Z tegge $");
36
37#include "opt_debug_cluster.h"
38
39#include <sys/param.h>
40#include <sys/systm.h>
41#include <sys/kernel.h>
42#include <sys/proc.h>
43#include <sys/bio.h>

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

590cluster_write(struct vnode *vp, struct buf *bp, u_quad_t filesize, int seqcount)
591{
592 daddr_t lbn;
593 int maxclen, cursize;
594 int lblocksize;
595 int async;
596
597 if (vp->v_type == VREG) {
36
37#include "opt_debug_cluster.h"
38
39#include <sys/param.h>
40#include <sys/systm.h>
41#include <sys/kernel.h>
42#include <sys/proc.h>
43#include <sys/bio.h>

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

590cluster_write(struct vnode *vp, struct buf *bp, u_quad_t filesize, int seqcount)
591{
592 daddr_t lbn;
593 int maxclen, cursize;
594 int lblocksize;
595 int async;
596
597 if (vp->v_type == VREG) {
598 async = vp->v_mount->mnt_flag & MNT_ASYNC;
598 async = vp->v_mount->mnt_kern_flag & MNTK_ASYNC;
599 lblocksize = vp->v_mount->mnt_stat.f_iosize;
600 } else {
601 async = 0;
602 lblocksize = bp->b_bufsize;
603 }
604 lbn = bp->b_lblkno;
605 KASSERT(bp->b_offset != NOOFFSET, ("cluster_write: no buffer offset"));
606

--- 390 unchanged lines hidden ---
599 lblocksize = vp->v_mount->mnt_stat.f_iosize;
600 } else {
601 async = 0;
602 lblocksize = bp->b_bufsize;
603 }
604 lbn = bp->b_lblkno;
605 KASSERT(bp->b_offset != NOOFFSET, ("cluster_write: no buffer offset"));
606

--- 390 unchanged lines hidden ---