Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev pass b_flags B_PHYS and B_RAW when setting up the bu...



details:   https://anonhg.NetBSD.org/src/rev/c399d7d51ba1
branches:  trunk
changeset: 1009445:c399d7d51ba1
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Thu Apr 23 09:40:08 2020 +0000

description:
pass b_flags B_PHYS and B_RAW when setting up the buf for underlying device

should fix misfired KASSERT() in xbd(4)

diffstat:

 sys/dev/vnd.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 4de46e87e028 -r c399d7d51ba1 sys/dev/vnd.c
--- a/sys/dev/vnd.c     Thu Apr 23 09:38:17 2020 +0000
+++ b/sys/dev/vnd.c     Thu Apr 23 09:40:08 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vnd.c,v 1.276 2020/04/13 08:05:02 maxv Exp $   */
+/*     $NetBSD: vnd.c,v 1.277 2020/04/23 09:40:08 jdolecek Exp $       */
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2008, 2020 The NetBSD Foundation, Inc.
@@ -91,7 +91,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.276 2020/04/13 08:05:02 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.277 2020/04/23 09:40:08 jdolecek Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_vnd.h"
@@ -724,7 +724,7 @@
 
                bp = &vnx->vx_buf;
                buf_init(bp);
-               bp->b_flags = (obp->b_flags & B_READ);
+               bp->b_flags = (obp->b_flags & (B_READ | B_PHYS | B_RAW));
                bp->b_oflags = obp->b_oflags;
                bp->b_cflags = obp->b_cflags;
                bp->b_iodone = vndiodone;



Home | Main Index | Thread Index | Old Index