Thread (35 messages) 35 messages, 4 authors, 2013-02-19

Re: [PATCH 4/9] virtio-blk: use virtqueue_start_buf on req path

From: Paolo Bonzini <pbonzini@redhat.com>
Date: 2013-02-18 09:05:42
Also in: kvm, lkml

Il 17/02/2013 07:37, Asias He ha scritto:
quoted
quoted
 static int __virtblk_add_req(struct virtqueue *vq,
-			     struct virtblk_req *vbr)
+			     struct virtblk_req *vbr,
+			     struct scatterlist *data_sg,
+			     unsigned data_nents)
 {
 	struct scatterlist sg;
 	enum dma_data_direction dir;
 	int ret;
 
+	int type = vbr->out_hdr.type & ~VIRTIO_BLK_T_OUT;
 	unsigned int nents = 2;
 	unsigned int nsg = 2;
 
-	if (vbr->nents) {
+	if (type == VIRTIO_BLK_T_SCSI_CMD) {
+		BUG_ON(use_bio);
Do we really need the BUG_ON?  Even if with use_bio=1,
VIRTIO_BLK_T_SCSI_CMD cmd can be fired. See this:
I stand corrected... will send the patch with this removed.

Paolo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help