Module Name: src Committed By: uebayasi Date: Sat Nov 20 07:47:35 UTC 2010
Modified Files: src/sys/miscfs/genfs [uebayasi-xip]: genfs_io.c Log Message: XIP has no "fake" (== unitinialized) pages, because pages are already initialized when mounted. Adjust getpages loop again. To generate a diff of this commit: cvs rdiff -u -r1.36.2.50 -r1.36.2.51 src/sys/miscfs/genfs/genfs_io.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/miscfs/genfs/genfs_io.c diff -u src/sys/miscfs/genfs/genfs_io.c:1.36.2.50 src/sys/miscfs/genfs/genfs_io.c:1.36.2.51 --- src/sys/miscfs/genfs/genfs_io.c:1.36.2.50 Sat Nov 20 05:15:59 2010 +++ src/sys/miscfs/genfs/genfs_io.c Sat Nov 20 07:47:34 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: genfs_io.c,v 1.36.2.50 2010/11/20 05:15:59 uebayasi Exp $ */ +/* $NetBSD: genfs_io.c,v 1.36.2.51 2010/11/20 07:47:34 uebayasi Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1993 @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: genfs_io.c,v 1.36.2.50 2010/11/20 05:15:59 uebayasi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: genfs_io.c,v 1.36.2.51 2010/11/20 07:47:34 uebayasi Exp $"); #include "opt_xip.h" @@ -668,16 +668,19 @@ int pcount; pcount = 1; + while ((pidx + pcount < npages) && ( #ifdef XIP - if ((ap->a_vp->v_vflag & VV_XIP) == 0) { + /* + * in XIP case, we don't know what page to read + * at this point! + */ + ((ap->a_vp->v_vflag & VV_XIP) != 0) || +#else + 0 || #endif - while (pidx + pcount < npages && - pgs[pidx + pcount]->flags & PG_FAKE) { + (pgs[pidx + pcount]->flags & PG_FAKE))) { pcount++; } -#ifdef XIP - } -#endif iobytes = MIN(iobytes, (pcount << PAGE_SHIFT) - (offset - trunc_page(offset))); }