Module Name:    src
Committed By:   bouyer
Date:           Tue Oct  9 21:53:03 UTC 2012

Modified Files:
        src/sys/ufs/ufs [tls-maxphys]: ufs_bmap.c

Log Message:
Use mnt_maxphys not MAXPHYS to limit the size of I/O to disk.
Now the read-ahead code does issue 512k requests to disk.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.49.14.1 src/sys/ufs/ufs/ufs_bmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/ufs/ufs/ufs_bmap.c
diff -u src/sys/ufs/ufs/ufs_bmap.c:1.49 src/sys/ufs/ufs/ufs_bmap.c:1.49.14.1
--- src/sys/ufs/ufs/ufs_bmap.c:1.49	Sun Mar  6 17:08:39 2011
+++ src/sys/ufs/ufs/ufs_bmap.c	Tue Oct  9 21:53:03 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ufs_bmap.c,v 1.49 2011/03/06 17:08:39 bouyer Exp $	*/
+/*	$NetBSD: ufs_bmap.c,v 1.49.14.1 2012/10/09 21:53:03 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1989, 1991, 1993
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ufs_bmap.c,v 1.49 2011/03/06 17:08:39 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ufs_bmap.c,v 1.49.14.1 2012/10/09 21:53:03 bouyer Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -138,12 +138,12 @@ ufs_bmaparray(struct vnode *vp, daddr_t 
 	if (runp) {
 		/*
 		 * XXX
-		 * If MAXBSIZE is the largest transfer the disks can handle,
+		 * If mnt_maxphys is the largest transfer the disks can handle,
 		 * we probably want maxrun to be 1 block less so that we
 		 * don't create a block larger than the device can handle.
 		 */
 		*runp = 0;
-		maxrun = MAXPHYS / mp->mnt_stat.f_iosize - 1;
+		maxrun = mp->mnt_maxphys / mp->mnt_stat.f_iosize - 1;
 	}
 
 	if (bn >= 0 && bn < NDADDR) {

Reply via email to