-/* $OpenBSD: softraid.c,v 1.423 2022/04/06 18:59:27 naddy Exp $ */
+/* $OpenBSD: softraid.c,v 1.424 2022/04/12 14:34:11 semarie Exp $ */
/*
* Copyright (c) 2007, 2008, 2009 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org>
size_t bufsize, dma_bufsize;
int rv = 1;
char *dma_buf;
+ int s;
DNPRINTF(SR_D_MISC, "%s: sr_rw(0x%x, %p, %zu, %lld 0x%lx)\n",
DEVNAME(sc), dev, buf, size, (long long)blkno, flags);
b.b_resid = bufsize;
b.b_vp = vp;
- if ((b.b_flags & B_READ) == 0)
+ if ((b.b_flags & B_READ) == 0) {
+ s = splbio();
vp->v_numoutput++;
+ splx(s);
+ }
LIST_INIT(&b.b_dep);
VOP_STRATEGY(vp, &b);
{
struct sr_chunk *sc = sd->sd_vol.sv_chunks[chunk];
struct sr_ccb *ccb = NULL;
+ int s;
ccb = sr_ccb_get(sd);
if (ccb == NULL)
ccb->ccb_buf.b_vp = sc->src_vn;
ccb->ccb_buf.b_bq = NULL;
- if (!ISSET(ccb->ccb_buf.b_flags, B_READ))
+ if (!ISSET(ccb->ccb_buf.b_flags, B_READ)) {
+ s = splbio();
ccb->ccb_buf.b_vp->v_numoutput++;
+ splx(s);
+ }
LIST_INIT(&ccb->ccb_buf.b_dep);
-/* $OpenBSD: vnode.h,v 1.164 2022/03/27 16:19:39 semarie Exp $ */
+/* $OpenBSD: vnode.h,v 1.165 2022/04/12 14:34:11 semarie Exp $ */
/* $NetBSD: vnode.h,v 1.38 1996/02/29 20:59:05 cgd Exp $ */
/*
* Locks used to protect struct members in struct vnode:
* a atomic
* V vnode_mtx
+ * B IPL_BIO
*/
struct uvm_vnode;
struct vnode {
struct buf_rb_bufs v_bufs_tree; /* lookup of all bufs */
struct buflists v_cleanblkhd; /* clean blocklist head */
struct buflists v_dirtyblkhd; /* dirty blocklist head */
- u_int v_numoutput; /* num of writes in progress */
+ u_int v_numoutput; /* [B] num of writes in progress */
LIST_ENTRY(vnode) v_synclist; /* vnode with dirty buffers */
union {
struct mount *vu_mountedhere;/* ptr to mounted vfs (VDIR) */