search for: alloc_disk

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

2008 Jan 31
4
[PATCH] virtio_blk: Dont waste major numbers
...ENOMEM; @@ -200,17 +206,11 @@ static int virtblk_probe(struct virtio_d goto out_free_vq; } - major = register_blkdev(0, "virtblk"); - if (major < 0) { - err = major; - goto out_mempool; - } - /* FIXME: How many partitions? How long is a piece of string? */ - vblk->disk = alloc_disk(1 << 4); + vblk->disk = alloc_disk(1 << PART_BITS); if (!vblk->disk) { err = -ENOMEM; - goto out_unregister_blkdev; + goto out_mempool; } vblk->disk->queue = blk_init_queue(do_virtblk_request, &vblk->lock); @@ -221,10 +221,12 @@ static int virtblk_probe(s...
2008 Jan 31
4
[PATCH] virtio_blk: Dont waste major numbers
...ENOMEM; @@ -200,17 +206,11 @@ static int virtblk_probe(struct virtio_d goto out_free_vq; } - major = register_blkdev(0, "virtblk"); - if (major < 0) { - err = major; - goto out_mempool; - } - /* FIXME: How many partitions? How long is a piece of string? */ - vblk->disk = alloc_disk(1 << 4); + vblk->disk = alloc_disk(1 << PART_BITS); if (!vblk->disk) { err = -ENOMEM; - goto out_unregister_blkdev; + goto out_mempool; } vblk->disk->queue = blk_init_queue(do_virtblk_request, &vblk->lock); @@ -221,10 +221,12 @@ static int virtblk_probe(s...
2020 Jun 15
0
[PATCH] virtio-blk: free vblk-vqs in error path of virtblk_probe()
On Mon, Jun 15, 2020 at 12:14:59PM +0800, Hou Tao wrote: > Else there will be memory leak if alloc_disk() fails. > > Fixes: 6a27b656fc02 ("block: virtio-blk: support multi virt queues per virtio-blk device") > Signed-off-by: Hou Tao <houtao1 at huawei.com> > --- > drivers/block/virtio_blk.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/blo...
2020 Jun 30
0
[PATCH] virtio-blk: free vblk-vqs in error path of virtblk_probe()
On Mon, Jun 15, 2020 at 12:14:59PM +0800, Hou Tao wrote: > Else there will be memory leak if alloc_disk() fails. > > Fixes: 6a27b656fc02 ("block: virtio-blk: support multi virt queues per virtio-blk device") > Signed-off-by: Hou Tao <houtao1 at huawei.com> > --- > drivers/block/virtio_blk.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/blo...
2020 Jul 01
0
[PATCH] virtio-blk: free vblk-vqs in error path of virtblk_probe()
On 6/14/20 10:14 PM, Hou Tao wrote: > Else there will be memory leak if alloc_disk() fails. Applied, thanks. -- Jens Axboe
2014 Jun 22
2
[PATCH v1 2/2] block: virtio-blk: support multi virt queues per virtio-blk device
...> @@ -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 is to fill the ring. */ > if (!virtblk_queue_depth) { > - virtblk_queue_depth = vblk->vq->num_free; > + virtblk_queue_depth = vblk->vq[0]-...
2014 Jun 22
2
[PATCH v1 2/2] block: virtio-blk: support multi virt queues per virtio-blk device
...> @@ -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 is to fill the ring. */ > if (!virtblk_queue_depth) { > - virtblk_queue_depth = vblk->vq->num_free; > + virtblk_queue_depth = vblk->vq[0]-...
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
2014 Jun 26
1
[PATCH v2 2/2] block: virtio-blk: support multi virt queues per virtio-blk device
...> @@ -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 is to fill the ring. */ > if (!virtblk_queue_depth) { > - virtblk_queue_depth = vblk->vq->num_free; > + virtblk_queue_depth = vblk->vqs[0]...
2014 Jun 26
1
[PATCH v2 2/2] block: virtio-blk: support multi virt queues per virtio-blk device
...> @@ -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 is to fill the ring. */ > if (!virtblk_queue_depth) { > - virtblk_queue_depth = vblk->vq->num_free; > + virtblk_queue_depth = vblk->vqs[0]...
2014 Jun 20
0
[PATCH v1 2/2] block: virtio-blk: support multi virt queues per virtio-blk device
..._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 is to fill the ring. */ if (!virtblk_queue_depth) { - virtblk_queue_depth = vblk->vq->num_free; + virtblk_queue_depth = vblk->vq[0]->num_free; /* ... but wi...
2014 Jun 13
0
[RFC PATCH 2/2] block: virtio-blk: support multi virt queues per virtio-blk device
..._vqs = num_vqs; +out: return err; } @@ -551,7 +586,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 +596,7 @@ static int virtblk_probe(struct virtio_device *vdev) /* Default queue sizing is to fill the ring. */ if (!virtblk_queue_depth) { - virtblk_queue_depth = vblk->vq->num_free; + virtblk_queue_depth = vblk->vq[0]->num_free; /* ... but wi...
2014 Jun 26
0
[PATCH v2 2/2] block: virtio-blk: support multi virt queues per virtio-blk device
...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 is to fill the ring. */ if (!virtblk_queue_depth) { - virtblk_queue_depth = vblk->vq->num_free; + virtblk_queue_depth = vblk->vqs[0].vq->num_free; /* ... bu...
2014 Jun 26
0
[PATCH v3 2/2] block: virtio-blk: support multi virt queues per virtio-blk device
...vblk->vqs); + out: return err; } @@ -551,7 +614,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 +624,7 @@ static int virtblk_probe(struct virtio_device *vdev) /* Default queue sizing is to fill the ring. */ if (!virtblk_queue_depth) { - virtblk_queue_depth = vblk->vq->num_free; + virtblk_queue_depth = vblk->vqs[0].vq->num_free; /* ... bu...
2007 Jul 29
1
[PATCH] BLOCK=n , LGUEST=m/y compile error
...implicit declaration of function 'blk_stop_queue' drivers/block/lguest_blk.c: In function 'lguestblk_probe': drivers/block/lguest_blk.c:304: error: implicit declaration of function 'register_blkdev' drivers/block/lguest_blk.c:313: error: implicit declaration of function 'alloc_disk' drivers/block/lguest_blk.c:313: warning: assignment makes pointer from integer without a cast drivers/block/lguest_blk.c:322: error: dereferencing pointer to incomplete type drivers/block/lguest_blk.c:322: error: implicit declaration of function 'blk_init_queue' drivers/block/lguest_bl...
2007 Jul 29
1
[PATCH] BLOCK=n , LGUEST=m/y compile error
...implicit declaration of function 'blk_stop_queue' drivers/block/lguest_blk.c: In function 'lguestblk_probe': drivers/block/lguest_blk.c:304: error: implicit declaration of function 'register_blkdev' drivers/block/lguest_blk.c:313: error: implicit declaration of function 'alloc_disk' drivers/block/lguest_blk.c:313: warning: assignment makes pointer from integer without a cast drivers/block/lguest_blk.c:322: error: dereferencing pointer to incomplete type drivers/block/lguest_blk.c:322: error: implicit declaration of function 'blk_init_queue' drivers/block/lguest_bl...
2014 Jun 26
6
[PATCH v3 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 26
6
[PATCH v3 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 26
7
[PATCH v2 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