Module Name:    src
Committed By:   jdolecek
Date:           Mon Jun 29 21:45:50 UTC 2020

Modified Files:
        src/sys/arch/xen/xen: xbd_xenbus.c

Log Message:
when using two linked requests for I/O (i.e. when backend doesn't support
INDIRECT segments), make sure to clear req_bp for both of them

fixes a misfired assertion in BLKIF_OP_FLUSH_DISKCACHE - PR port-xen/55431


To generate a diff of this commit:
cvs rdiff -u -r1.127 -r1.128 src/sys/arch/xen/xen/xbd_xenbus.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/xen/xen/xbd_xenbus.c
diff -u src/sys/arch/xen/xen/xbd_xenbus.c:1.127 src/sys/arch/xen/xen/xbd_xenbus.c:1.128
--- src/sys/arch/xen/xen/xbd_xenbus.c:1.127	Wed May 13 16:17:46 2020
+++ src/sys/arch/xen/xen/xbd_xenbus.c	Mon Jun 29 21:45:50 2020
@@ -1,4 +1,4 @@
-/*      $NetBSD: xbd_xenbus.c,v 1.127 2020/05/13 16:17:46 jdolecek Exp $      */
+/*      $NetBSD: xbd_xenbus.c,v 1.128 2020/06/29 21:45:50 jdolecek Exp $      */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -50,7 +50,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.127 2020/05/13 16:17:46 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.128 2020/06/29 21:45:50 jdolecek Exp $");
 
 #include "opt_xen.h"
 
@@ -832,6 +832,7 @@ again:
 		}
 
 		bp = xbdreq->req_bp;
+		xbdreq->req_bp = NULL;
 		KASSERT(bp != NULL && bp->b_data != NULL);
 		DPRINTF(("%s(%p): b_bcount = %ld\n", __func__,
 		    bp, (long)bp->b_bcount));
@@ -887,7 +888,7 @@ again:
 
 		if (__predict_false(bp->b_data != xbdreq->req_data))
 			xbd_unmap_align(sc, xbdreq, true);
-		xbdreq->req_bp = xbdreq->req_data = NULL;
+		xbdreq->req_data = NULL;
 
 		dk_done(&sc->sc_dksc, bp);
 

Reply via email to