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

should fix misfired KASSERT() in xbd(4)
This commit is contained in:
jdolecek 2020-04-23 09:40:08 +00:00
parent 01d1f1dd0c
commit 8fb44ee954

View File

@ -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. * Copyright (c) 1996, 1997, 1998, 2008, 2020 The NetBSD Foundation, Inc.
@ -91,7 +91,7 @@
*/ */
#include <sys/cdefs.h> #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) #if defined(_KERNEL_OPT)
#include "opt_vnd.h" #include "opt_vnd.h"
@ -724,7 +724,7 @@ vndthread(void *arg)
bp = &vnx->vx_buf; bp = &vnx->vx_buf;
buf_init(bp); 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_oflags = obp->b_oflags;
bp->b_cflags = obp->b_cflags; bp->b_cflags = obp->b_cflags;
bp->b_iodone = vndiodone; bp->b_iodone = vndiodone;