Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Jan 2014 18:39:39 +0000 (UTC)
From:      Bryan Venteicher <bryanv@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r260857 - stable/10/sys/dev/virtio/block
Message-ID:  <201401181839.s0IIddmR083188@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bryanv
Date: Sat Jan 18 18:39:39 2014
New Revision: 260857
URL: http://svnweb.freebsd.org/changeset/base/260857

Log:
  MFC r260582: Add unmapped IO support to virtio_blk(4)

Modified:
  stable/10/sys/dev/virtio/block/virtio_blk.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/virtio/block/virtio_blk.c
==============================================================================
--- stable/10/sys/dev/virtio/block/virtio_blk.c	Sat Jan 18 18:36:41 2014	(r260856)
+++ stable/10/sys/dev/virtio/block/virtio_blk.c	Sat Jan 18 18:39:39 2014	(r260857)
@@ -726,7 +726,7 @@ vtblk_alloc_disk(struct vtblk_softc *sc,
 	dp->d_name = VTBLK_DISK_NAME;
 	dp->d_unit = device_get_unit(dev);
 	dp->d_drv1 = sc;
-	dp->d_flags = DISKFLAG_CANFLUSHCACHE;
+	dp->d_flags = DISKFLAG_CANFLUSHCACHE | DISKFLAG_UNMAPPED_BIO;
 	dp->d_hba_vendor = virtio_get_vendor(dev);
 	dp->d_hba_device = virtio_get_device(dev);
 	dp->d_hba_subvendor = virtio_get_subvendor(dev);
@@ -931,10 +931,11 @@ vtblk_execute_request(struct vtblk_softc
 	sglist_append(sg, &req->vbr_hdr, sizeof(struct virtio_blk_outhdr));
 
 	if (bp->bio_cmd == BIO_READ || bp->bio_cmd == BIO_WRITE) {
-		error = sglist_append(sg, bp->bio_data, bp->bio_bcount);
-		if (error || sg->sg_nseg == sg->sg_maxseg)
+		error = sglist_append_bio(sg, bp);
+		if (error || sg->sg_nseg == sg->sg_maxseg) {
 			panic("%s: data buffer too big bio:%p error:%d",
 			    __func__, bp, error);
+		}
 
 		/* BIO_READ means the host writes into our buffer. */
 		if (bp->bio_cmd == BIO_READ)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401181839.s0IIddmR083188>