search for: out_free_vblk

Displaying 20 results from an estimated 70 matches for "out_free_vblk".

Did you mean: out_free_vb
2011 Jun 01
6
[PATCH 1/1] [virt] virtio-blk: Use ida to allocate disk index
...vblk->disk->fops = &virtblk_fops; vblk->disk->driverfs_dev = &vdev->dev; - index++; + vblk->index = index; /* configure queue flush support */ if (virtio_has_feature(vdev, VIRTIO_BLK_F_FLUSH)) @@ -516,6 +535,10 @@ out_free_vq: vdev->config->del_vqs(vdev); out_free_vblk: kfree(vblk); +out_free_index: + spin_lock(&vd_index_lock); + ida_remove(&vd_index_ida, index); + spin_unlock(&vd_index_lock); out: return err; } @@ -529,6 +552,10 @@ static void __devexit virtblk_remove(struct virtio_device *vdev) /* Nothing should be pending. */ BUG_ON(!list...
2011 Jun 01
6
[PATCH 1/1] [virt] virtio-blk: Use ida to allocate disk index
...vblk->disk->fops = &virtblk_fops; vblk->disk->driverfs_dev = &vdev->dev; - index++; + vblk->index = index; /* configure queue flush support */ if (virtio_has_feature(vdev, VIRTIO_BLK_F_FLUSH)) @@ -516,6 +535,10 @@ out_free_vq: vdev->config->del_vqs(vdev); out_free_vblk: kfree(vblk); +out_free_index: + spin_lock(&vd_index_lock); + ida_remove(&vd_index_ida, index); + spin_unlock(&vd_index_lock); out: return err; } @@ -529,6 +552,10 @@ static void __devexit virtblk_remove(struct virtio_device *vdev) /* Nothing should be pending. */ BUG_ON(!list...
2012 May 03
1
[PATCH v2] virtio-blk: Fix hot-unplug race in remove method
...3 insertions(+), 3 deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 72fe55d..670c28f 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -443,7 +443,7 @@ static int __devinit virtblk_probe(struct virtio_device *vdev) if (err) goto out_free_vblk; - vblk->pool = mempool_create_kmalloc_pool(1,sizeof(struct virtblk_req)); + vblk->pool = mempool_create_kmalloc_pool(1, sizeof(struct virtblk_req)); if (!vblk->pool) { err = -ENOMEM; goto out_free_vq; @@ -576,20 +576,30 @@ static void __devexit virtblk_remove(struct virtio_devic...
2012 May 03
1
[PATCH v2] virtio-blk: Fix hot-unplug race in remove method
...3 insertions(+), 3 deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 72fe55d..670c28f 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -443,7 +443,7 @@ static int __devinit virtblk_probe(struct virtio_device *vdev) if (err) goto out_free_vblk; - vblk->pool = mempool_create_kmalloc_pool(1,sizeof(struct virtblk_req)); + vblk->pool = mempool_create_kmalloc_pool(1, sizeof(struct virtblk_req)); if (!vblk->pool) { err = -ENOMEM; goto out_free_vq; @@ -576,20 +576,30 @@ static void __devexit virtblk_remove(struct virtio_devic...
2012 May 03
2
[PATCH 1/2] virtio-blk: Fix hot-unplug race in remove method
...LL) { BUG_ON(req->nr_phys_segments + 2 > vblk->sg_elems); + vblk->req_in_flight++; /* If this request fails, stop queue and wait for something to finish to restart it. */ @@ -443,7 +448,7 @@ static int __devinit virtblk_probe(struct virtio_device *vdev) if (err) goto out_free_vblk; - vblk->pool = mempool_create_kmalloc_pool(1,sizeof(struct virtblk_req)); + vblk->pool = mempool_create_kmalloc_pool(1, sizeof(struct virtblk_req)); if (!vblk->pool) { err = -ENOMEM; goto out_free_vq; @@ -466,6 +471,7 @@ static int __devinit virtblk_probe(struct virtio_device *v...
2012 May 03
2
[PATCH 1/2] virtio-blk: Fix hot-unplug race in remove method
...LL) { BUG_ON(req->nr_phys_segments + 2 > vblk->sg_elems); + vblk->req_in_flight++; /* If this request fails, stop queue and wait for something to finish to restart it. */ @@ -443,7 +448,7 @@ static int __devinit virtblk_probe(struct virtio_device *vdev) if (err) goto out_free_vblk; - vblk->pool = mempool_create_kmalloc_pool(1,sizeof(struct virtblk_req)); + vblk->pool = mempool_create_kmalloc_pool(1, sizeof(struct virtblk_req)); if (!vblk->pool) { err = -ENOMEM; goto out_free_vq; @@ -466,6 +471,7 @@ static int __devinit virtblk_probe(struct virtio_device *v...
2020 Jun 15
0
[PATCH] virtio-blk: free vblk-vqs in error path of virtblk_probe()
...80df853ee49 100644 > --- a/drivers/block/virtio_blk.c > +++ b/drivers/block/virtio_blk.c > @@ -878,6 +878,7 @@ static int virtblk_probe(struct virtio_device *vdev) > put_disk(vblk->disk); > out_free_vq: > vdev->config->del_vqs(vdev); > + kfree(vblk->vqs); > out_free_vblk: > kfree(vblk); > out_free_index: > -- > 2.25.0.4.g0ad7144999 > The patch LGTM: Reviewed-by: Stefano Garzarella <sgarzare at redhat.com>
2020 Jun 30
0
[PATCH] virtio-blk: free vblk-vqs in error path of virtblk_probe()
...80df853ee49 100644 > --- a/drivers/block/virtio_blk.c > +++ b/drivers/block/virtio_blk.c > @@ -878,6 +878,7 @@ static int virtblk_probe(struct virtio_device *vdev) > put_disk(vblk->disk); > out_free_vq: > vdev->config->del_vqs(vdev); > + kfree(vblk->vqs); > out_free_vblk: > kfree(vblk); > out_free_index: > -- > 2.25.0.4.g0ad7144999 > Reviewed-by: Ming Lei <ming.lei at redhat.com> -- Ming
2014 Jun 22
2
[PATCH v1 2/2] block: virtio-blk: support multi virt queues per virtio-blk device
...+ for (i = 0; i < num_vqs; i++) > + spin_lock_init(&vblk->vq_lock[i]); > + vblk->num_vqs = num_vqs; > +out: > return err; > } > > @@ -551,7 +581,6 @@ static int virtblk_probe(struct virtio_device *vdev) > err = init_vq(vblk); > if (err) > goto out_free_vblk; > - spin_lock_init(&vblk->vq_lock); > > /* FIXME: How many partitions? How long is a piece of string? */ > vblk->disk = alloc_disk(1 << PART_BITS); > @@ -562,7 +591,7 @@ static int virtblk_probe(struct virtio_device *vdev) > > /* Default queue sizing...
2014 Jun 22
2
[PATCH v1 2/2] block: virtio-blk: support multi virt queues per virtio-blk device
...+ for (i = 0; i < num_vqs; i++) > + spin_lock_init(&vblk->vq_lock[i]); > + vblk->num_vqs = num_vqs; > +out: > return err; > } > > @@ -551,7 +581,6 @@ static int virtblk_probe(struct virtio_device *vdev) > err = init_vq(vblk); > if (err) > goto out_free_vblk; > - spin_lock_init(&vblk->vq_lock); > > /* FIXME: How many partitions? How long is a piece of string? */ > vblk->disk = alloc_disk(1 << PART_BITS); > @@ -562,7 +591,7 @@ static int virtblk_probe(struct virtio_device *vdev) > > /* Default queue sizing...
2014 Jun 20
3
[PATCH v1 0/2] block: virtio-blk: support multi vq per virtio-blk
Hi, These patches try to support multi virtual queues(multi-vq) in one virtio-blk device, and maps each virtual queue(vq) to blk-mq's hardware queue. With this approach, both scalability and performance on virtio-blk device can get improved. For verifying the improvement, I implements virtio-blk multi-vq over qemu's dataplane feature, and both handling host notification from each vq and
2014 Jun 20
3
[PATCH v1 0/2] block: virtio-blk: support multi vq per virtio-blk
Hi, These patches try to support multi virtual queues(multi-vq) in one virtio-blk device, and maps each virtual queue(vq) to blk-mq's hardware queue. With this approach, both scalability and performance on virtio-blk device can get improved. For verifying the improvement, I implements virtio-blk multi-vq over qemu's dataplane feature, and both handling host notification from each vq and
2007 Jul 03
6
[PATCH 1/3] Virtio draft IV
In response to Avi's excellent analysis, I've updated virtio as promised (apologies for the delay, travel got in the way). === This attempts to implement a "virtual I/O" layer which should allow common drivers to be efficiently used across most virtual I/O mechanisms. It will no-doubt need further enhancement. The details of probing the device are left to hypervisor-specific
2007 Jul 03
6
[PATCH 1/3] Virtio draft IV
In response to Avi's excellent analysis, I've updated virtio as promised (apologies for the delay, travel got in the way). === This attempts to implement a "virtual I/O" layer which should allow common drivers to be efficiently used across most virtual I/O mechanisms. It will no-doubt need further enhancement. The details of probing the device are left to hypervisor-specific
2009 May 07
6
[PATCH 1/3] virtio: find_vqs/del_vqs virtio operations
...e(vblk->sg, vblk->sg_elems); /* We expect one virtqueue, for output. */ - vblk->vq = vdev->config->find_vq(vdev, 0, blk_done); - if (IS_ERR(vblk->vq)) { - err = PTR_ERR(vblk->vq); + err = vdev->config->find_vqs(vdev, 1, &vblk->vq, callback); + if (err) goto out_free_vblk; - } vblk->pool = mempool_create_kmalloc_pool(1,sizeof(struct virtblk_req)); if (!vblk->pool) { @@ -323,7 +322,7 @@ out_put_disk: out_mempool: mempool_destroy(vblk->pool); out_free_vq: - vdev->config->del_vq(vblk->vq); + vdev->config->del_vqs(vdev); out_free_vblk:...
2009 May 07
6
[PATCH 1/3] virtio: find_vqs/del_vqs virtio operations
...e(vblk->sg, vblk->sg_elems); /* We expect one virtqueue, for output. */ - vblk->vq = vdev->config->find_vq(vdev, 0, blk_done); - if (IS_ERR(vblk->vq)) { - err = PTR_ERR(vblk->vq); + err = vdev->config->find_vqs(vdev, 1, &vblk->vq, callback); + if (err) goto out_free_vblk; - } vblk->pool = mempool_create_kmalloc_pool(1,sizeof(struct virtblk_req)); if (!vblk->pool) { @@ -323,7 +322,7 @@ out_put_disk: out_mempool: mempool_destroy(vblk->pool); out_free_vq: - vdev->config->del_vq(vblk->vq); + vdev->config->del_vqs(vdev); out_free_vblk:...
2009 May 12
0
[PATCHv4] virtio: find_vqs/del_vqs virtio operations
...lems); /* We expect one virtqueue, for output. */ - vblk->vq = vdev->config->find_vq(vdev, 0, blk_done, "requests"); - if (IS_ERR(vblk->vq)) { - err = PTR_ERR(vblk->vq); + err = vdev->config->find_vqs(vdev, 1, &vblk->vq, callback, name); + if (err) goto out_free_vblk; - } vblk->pool = mempool_create_kmalloc_pool(1,sizeof(struct virtblk_req)); if (!vblk->pool) { @@ -323,7 +323,7 @@ out_put_disk: out_mempool: mempool_destroy(vblk->pool); out_free_vq: - vdev->config->del_vq(vblk->vq); + vdev->config->del_vqs(vdev); out_free_vblk:...
2009 May 12
0
[PATCHv4] virtio: find_vqs/del_vqs virtio operations
...lems); /* We expect one virtqueue, for output. */ - vblk->vq = vdev->config->find_vq(vdev, 0, blk_done, "requests"); - if (IS_ERR(vblk->vq)) { - err = PTR_ERR(vblk->vq); + err = vdev->config->find_vqs(vdev, 1, &vblk->vq, callback, name); + if (err) goto out_free_vblk; - } vblk->pool = mempool_create_kmalloc_pool(1,sizeof(struct virtblk_req)); if (!vblk->pool) { @@ -323,7 +323,7 @@ out_put_disk: out_mempool: mempool_destroy(vblk->pool); out_free_vq: - vdev->config->del_vq(vblk->vq); + vdev->config->del_vqs(vdev); out_free_vblk:...
2014 Jun 26
1
[PATCH v2 2/2] block: virtio-blk: support multi virt queues per virtio-blk device
...You need to keep the memory around until unplug. > + err_name_array: > + if (err) > + kfree(vblk->vqs); > + out: > return err; > } > > @@ -551,7 +619,6 @@ static int virtblk_probe(struct virtio_device *vdev) > err = init_vq(vblk); > if (err) > goto out_free_vblk; > - spin_lock_init(&vblk->vq_lock); > > /* FIXME: How many partitions? How long is a piece of string? */ > vblk->disk = alloc_disk(1 << PART_BITS); > @@ -562,7 +629,7 @@ static int virtblk_probe(struct virtio_device *vdev) > > /* Default queue sizing...
2014 Jun 26
1
[PATCH v2 2/2] block: virtio-blk: support multi virt queues per virtio-blk device
...You need to keep the memory around until unplug. > + err_name_array: > + if (err) > + kfree(vblk->vqs); > + out: > return err; > } > > @@ -551,7 +619,6 @@ static int virtblk_probe(struct virtio_device *vdev) > err = init_vq(vblk); > if (err) > goto out_free_vblk; > - spin_lock_init(&vblk->vq_lock); > > /* FIXME: How many partitions? How long is a piece of string? */ > vblk->disk = alloc_disk(1 << PART_BITS); > @@ -562,7 +629,7 @@ static int virtblk_probe(struct virtio_device *vdev) > > /* Default queue sizing...