Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F113878771
D37990.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D37990.diff
View Options
diff --git a/sys/dev/virtio/block/virtio_blk.c b/sys/dev/virtio/block/virtio_blk.c
--- a/sys/dev/virtio/block/virtio_blk.c
+++ b/sys/dev/virtio/block/virtio_blk.c
@@ -1126,15 +1126,17 @@
sglist_append(sg, &req->vbr_ack, sizeof(uint8_t));
readable = sg->sg_nseg - writable;
- switch (bp->bio_cmd) {
- case BIO_READ:
- bus_dmamap_sync(sc->vtblk_dmat, req->vbr_mapp,
- BUS_DMASYNC_PREREAD);
- break;
- case BIO_WRITE:
- bus_dmamap_sync(sc->vtblk_dmat, req->vbr_mapp,
- BUS_DMASYNC_PREWRITE);
- break;
+ if (req->vbr_mapp != NULL) {
+ switch (bp->bio_cmd) {
+ case BIO_READ:
+ bus_dmamap_sync(sc->vtblk_dmat, req->vbr_mapp,
+ BUS_DMASYNC_PREREAD);
+ break;
+ case BIO_WRITE:
+ bus_dmamap_sync(sc->vtblk_dmat, req->vbr_mapp,
+ BUS_DMASYNC_PREWRITE);
+ break;
+ }
}
error = virtqueue_enqueue(vq, req, sg, readable, writable);
@@ -1191,17 +1193,21 @@
}
bp = req->vbr_bp;
- switch (bp->bio_cmd) {
- case BIO_READ:
- bus_dmamap_sync(sc->vtblk_dmat, req->vbr_mapp,
- BUS_DMASYNC_POSTREAD);
- bus_dmamap_unload(sc->vtblk_dmat, req->vbr_mapp);
- break;
- case BIO_WRITE:
- bus_dmamap_sync(sc->vtblk_dmat, req->vbr_mapp,
- BUS_DMASYNC_POSTWRITE);
- bus_dmamap_unload(sc->vtblk_dmat, req->vbr_mapp);
- break;
+ if (req->vbr_mapp != NULL) {
+ switch (bp->bio_cmd) {
+ case BIO_READ:
+ bus_dmamap_sync(sc->vtblk_dmat, req->vbr_mapp,
+ BUS_DMASYNC_POSTREAD);
+ bus_dmamap_unload(sc->vtblk_dmat,
+ req->vbr_mapp);
+ break;
+ case BIO_WRITE:
+ bus_dmamap_sync(sc->vtblk_dmat, req->vbr_mapp,
+ BUS_DMASYNC_POSTWRITE);
+ bus_dmamap_unload(sc->vtblk_dmat,
+ req->vbr_mapp);
+ break;
+ }
}
bp->bio_error = vtblk_request_error(req);
TAILQ_INSERT_TAIL(queue, bp, bio_queue);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Apr 6, 12:09 AM (12 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17398678
Default Alt Text
D37990.diff (1 KB)
Attached To
Mode
D37990: vtblk: secondary fix for dumping
Attached
Detach File
Event Timeline
Log In to Comment