Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/xen/xen Define XBD_MAX_XFER instead of using (PAGE_...
details: https://anonhg.NetBSD.org/src/rev/6756f98fd9cf
branches: trunk
changeset: 777540:6756f98fd9cf
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Wed Feb 22 16:50:46 2012 +0000
description:
Define XBD_MAX_XFER instead of using (PAGE_SIZE * BLKIF_MAX_SEGMENTS_PER_REQUEST) directly.
diffstat:
sys/arch/xen/xen/xbd_xenbus.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (37 lines):
diff -r e8991adbc34e -r 6756f98fd9cf sys/arch/xen/xen/xbd_xenbus.c
--- a/sys/arch/xen/xen/xbd_xenbus.c Wed Feb 22 16:42:07 2012 +0000
+++ b/sys/arch/xen/xen/xbd_xenbus.c Wed Feb 22 16:50:46 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: xbd_xenbus.c,v 1.54 2012/02/21 01:47:50 jakllsch Exp $ */
+/* $NetBSD: xbd_xenbus.c,v 1.55 2012/02/22 16:50: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.54 2012/02/21 01:47:50 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.55 2012/02/22 16:50:46 jakllsch Exp $");
#include "opt_xen.h"
@@ -94,6 +94,7 @@
#define GRANT_INVALID_REF -1
#define XBD_RING_SIZE __CONST_RING_SIZE(blkif, PAGE_SIZE)
+#define XBD_MAX_XFER (PAGE_SIZE * BLKIF_MAX_SEGMENTS_PER_REQUEST)
#define XEN_BSHIFT 9 /* log2(XEN_BSIZE) */
#define XEN_BSIZE (1 << XEN_BSHIFT)
@@ -736,8 +737,8 @@
static void
xbdminphys(struct buf *bp)
{
- if (bp->b_bcount > (PAGE_SIZE * BLKIF_MAX_SEGMENTS_PER_REQUEST)) {
- bp->b_bcount = PAGE_SIZE * BLKIF_MAX_SEGMENTS_PER_REQUEST;
+ if (bp->b_bcount > XBD_MAX_XFER) {
+ bp->b_bcount = XBD_MAX_XFER;
}
minphys(bp);
}
Home |
Main Index |
Thread Index |
Old Index