svn commit: r265301 - in stable/9/sys/dev/virtio: block scsi
Bryan Venteicher
bryanv at FreeBSD.org
Sun May 4 00:57:39 UTC 2014
Author: bryanv
Date: Sun May 4 00:57:38 2014
New Revision: 265301
URL: http://svnweb.freebsd.org/changeset/base/265301
Log:
MFC r260582, r260583:
- Add unmapped IO support to virtio_blk(4)
- Add unmapped IO support to virtio_scsi(4)
Modified:
stable/9/sys/dev/virtio/block/virtio_blk.c
stable/9/sys/dev/virtio/scsi/virtio_scsi.c
Directory Properties:
stable/9/sys/ (props changed)
stable/9/sys/dev/ (props changed)
Modified: stable/9/sys/dev/virtio/block/virtio_blk.c
==============================================================================
--- stable/9/sys/dev/virtio/block/virtio_blk.c Sun May 4 00:45:00 2014 (r265300)
+++ stable/9/sys/dev/virtio/block/virtio_blk.c Sun May 4 00:57:38 2014 (r265301)
@@ -687,7 +687,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);
@@ -892,10 +892,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)
Modified: stable/9/sys/dev/virtio/scsi/virtio_scsi.c
==============================================================================
--- stable/9/sys/dev/virtio/scsi/virtio_scsi.c Sun May 4 00:45:00 2014 (r265300)
+++ stable/9/sys/dev/virtio/scsi/virtio_scsi.c Sun May 4 00:57:38 2014 (r265301)
@@ -878,7 +878,7 @@ vtscsi_cam_path_inquiry(struct vtscsi_so
cpi->version_num = 1;
cpi->hba_inquiry = PI_TAG_ABLE;
cpi->target_sprt = 0;
- cpi->hba_misc = PIM_SEQSCAN;
+ cpi->hba_misc = PIM_SEQSCAN | PIM_UNMAPPED;
if (vtscsi_bus_reset_disable != 0)
cpi->hba_misc |= PIM_NOBUSRESET;
cpi->hba_eng_cnt = 0;
@@ -946,6 +946,9 @@ vtscsi_sg_append_scsi_buf(struct vtscsi_
(vm_paddr_t) dseg->ds_addr, dseg->ds_len);
}
break;
+ case CAM_DATA_BIO:
+ error = sglist_append_bio(sg, (struct bio *) csio->data_ptr);
+ break;
default:
error = EINVAL;
break;
More information about the svn-src-stable-9
mailing list