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 when checking for physio request check for ...
details: https://anonhg.NetBSD.org/src/rev/77f563f272c2
branches: trunk
changeset: 971168:77f563f272c2
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Thu Apr 16 09:51:40 2020 +0000
description:
when checking for physio request check for B_PHYS in b_flags rather
than an internal field, so this works when the original buf is
wrapped by another one by e.g. dk(4)
fixes misfired assert when doing newfs on a wedge, reported by Manuel Bouyer
diffstat:
sys/arch/xen/xen/xbd_xenbus.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diffs (32 lines):
diff -r 23b5ef04faa7 -r 77f563f272c2 sys/arch/xen/xen/xbd_xenbus.c
--- a/sys/arch/xen/xen/xbd_xenbus.c Thu Apr 16 09:28:52 2020 +0000
+++ b/sys/arch/xen/xen/xbd_xenbus.c Thu Apr 16 09:51:40 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: xbd_xenbus.c,v 1.114 2020/04/15 10:16:47 jdolecek Exp $ */
+/* $NetBSD: xbd_xenbus.c,v 1.115 2020/04/16 09:51:40 jdolecek Exp $ */
/*
* Copyright (c) 2006 Manuel Bouyer.
@@ -50,7 +50,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.114 2020/04/15 10:16:47 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.115 2020/04/16 09:51:40 jdolecek Exp $");
#include "opt_xen.h"
@@ -1207,8 +1207,11 @@
static int
xbd_map_align(struct xbd_xenbus_softc *sc, struct xbd_req *req)
{
- /* Only can get here if this is physio() request */
- KASSERT(req->req_bp->b_saveaddr != NULL);
+ /*
+ * Only can get here if this is physio() request, block I/O
+ * uses DEV_BSIZE-aligned buffers.
+ */
+ KASSERT((req->req_bp->b_flags & B_PHYS) != 0);
sc->sc_cnt_map_unalign.ev_count++;
Home |
Main Index |
Thread Index |
Old Index