Module Name: src
Committed By: jakllsch
Date: Wed Feb 22 16:53:46 UTC 2012
Modified Files:
src/sys/arch/xen/xen: xbd_xenbus.c
Log Message:
Only attempt to handle as much data as we can handle.
Per my testing, allows normal MAXPHYS on domU kernels.
To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/xen/xen/xbd_xenbus.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/arch/xen/xen/xbd_xenbus.c
diff -u src/sys/arch/xen/xen/xbd_xenbus.c:1.55 src/sys/arch/xen/xen/xbd_xenbus.c:1.56
--- src/sys/arch/xen/xen/xbd_xenbus.c:1.55 Wed Feb 22 16:50:46 2012
+++ src/sys/arch/xen/xen/xbd_xenbus.c Wed Feb 22 16:53:46 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: xbd_xenbus.c,v 1.55 2012/02/22 16:50:46 jakllsch Exp $ */
+/* $NetBSD: xbd_xenbus.c,v 1.56 2012/02/22 16:53:46 jakllsch Exp $ */
/*
* Copyright (c) 2006 Manuel Bouyer.
@@ -50,7 +50,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.55 2012/02/22 16:50:46 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.56 2012/02/22 16:53:46 jakllsch Exp $");
#include "opt_xen.h"
@@ -1017,7 +1017,11 @@ xbdstart(struct dk_softc *dksc, struct b
bcount = bp->b_bcount;
bp->b_resid = 0;
}
- for (seg = 0, bcount = bp->b_bcount; bcount > 0;) {
+ if (bcount > XBD_MAX_XFER) {
+ bp->b_resid += bcount - XBD_MAX_XFER;
+ bcount = XBD_MAX_XFER;
+ }
+ for (seg = 0; bcount > 0;) {
pmap_extract_ma(pmap_kernel(), va, &ma);
KASSERT((ma & (XEN_BSIZE - 1)) == 0);
if (bcount > PAGE_SIZE - off)