search for: out_put_disk

Displaying 20 results from an estimated 63 matches for "out_put_disk".

2017 Jan 09
4
[PATCH] virtio_blk: fix panic in initialization error path
...insertions(+), 1 deletion(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 5545a679abd8..8587361e5356 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -628,11 +628,12 @@ static int virtblk_probe(struct virtio_device *vdev) if (err) goto out_put_disk; - q = vblk->disk->queue = blk_mq_init_queue(&vblk->tag_set); + q = blk_mq_init_queue(&vblk->tag_set); if (IS_ERR(q)) { err = -ENOMEM; goto out_free_tags; } + vblk->disk->queue = q; q->queuedata = vblk; -- 2.11.0
2017 Jan 09
4
[PATCH] virtio_blk: fix panic in initialization error path
...insertions(+), 1 deletion(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 5545a679abd8..8587361e5356 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -628,11 +628,12 @@ static int virtblk_probe(struct virtio_device *vdev) if (err) goto out_put_disk; - q = vblk->disk->queue = blk_mq_init_queue(&vblk->tag_set); + q = blk_mq_init_queue(&vblk->tag_set); if (IS_ERR(q)) { err = -ENOMEM; goto out_free_tags; } + vblk->disk->queue = q; q->queuedata = vblk; -- 2.11.0
2020 Jul 15
3
[PATCH] virtio-blk: check host supplied logical block size
...ic int virtblk_probe(struct virtio_device *vdev) device_add_disk(&vdev->dev, vblk->disk, virtblk_attr_groups); return 0; +out_cleanup_queue: + blk_cleanup_queue(vblk->disk->queue); + vblk->disk->queue = NULL; out_free_tags: blk_mq_free_tag_set(&vblk->tag_set); out_put_disk: -- 2.26.2
2020 Jul 15
3
[PATCH] virtio-blk: check host supplied logical block size
...ic int virtblk_probe(struct virtio_device *vdev) device_add_disk(&vdev->dev, vblk->disk, virtblk_attr_groups); return 0; +out_cleanup_queue: + blk_cleanup_queue(vblk->disk->queue); + vblk->disk->queue = NULL; out_free_tags: blk_mq_free_tag_set(&vblk->tag_set); out_put_disk: -- 2.26.2
2020 Jul 15
2
[PATCH] virtio-blk: check host supplied logical block size
...;dev, vblk->disk, virtblk_attr_groups); > > return 0; > > > > +out_cleanup_queue: > > + blk_cleanup_queue(vblk->disk->queue); > > + vblk->disk->queue = NULL; > > out_free_tags: > > blk_mq_free_tag_set(&vblk->tag_set); > > out_put_disk: > > -- > > 2.26.2 Best regards, Maxim Levitsky
2020 Jul 15
2
[PATCH] virtio-blk: check host supplied logical block size
...;dev, vblk->disk, virtblk_attr_groups); > > return 0; > > > > +out_cleanup_queue: > > + blk_cleanup_queue(vblk->disk->queue); > > + vblk->disk->queue = NULL; > > out_free_tags: > > blk_mq_free_tag_set(&vblk->tag_set); > > out_put_disk: > > -- > > 2.26.2 Best regards, Maxim Levitsky
2012 May 21
6
[RFC PATCH 1/5] block: Introduce q->abort_queue_fn()
When user hot-unplug a disk which is busy serving I/O, __blk_run_queue might be unable to drain all the requests. As a result, the blk_drain_queue() would loop forever and blk_cleanup_queue would not return. So hot-unplug will fail. This patch adds a callback in blk_drain_queue() for low lever driver to abort requests. Currently, this is useful for virtio-blk to do cleanup in hot-unplug. Cc:
2012 May 21
6
[RFC PATCH 1/5] block: Introduce q->abort_queue_fn()
When user hot-unplug a disk which is busy serving I/O, __blk_run_queue might be unable to drain all the requests. As a result, the blk_drain_queue() would loop forever and blk_cleanup_queue would not return. So hot-unplug will fail. This patch adds a callback in blk_drain_queue() for low lever driver to abort requests. Currently, this is useful for virtio-blk to do cleanup in hot-unplug. Cc:
2010 Jun 18
4
[PATCH 1/2] Add 'serial' attribute to virtio-blk devices
...devinit virtblk_probe(struct virtio_device *vdev) add_disk(vblk->disk); + err = device_create_file(disk_to_dev(vblk->disk), &dev_attr_serial); + if (err) + goto out_del_disk; + return 0; +out_del_disk: + del_gendisk(vblk->disk); + blk_cleanup_queue(vblk->disk->queue); out_put_disk: put_disk(vblk->disk); out_mempool: -- 1.6.3.3
2010 Jun 18
4
[PATCH 1/2] Add 'serial' attribute to virtio-blk devices
...devinit virtblk_probe(struct virtio_device *vdev) add_disk(vblk->disk); + err = device_create_file(disk_to_dev(vblk->disk), &dev_attr_serial); + if (err) + goto out_del_disk; + return 0; +out_del_disk: + del_gendisk(vblk->disk); + blk_cleanup_queue(vblk->disk->queue); out_put_disk: put_disk(vblk->disk); out_mempool: -- 1.6.3.3
2007 May 09
3
[patch 8/9] lguest: the block driver
...< 0) { + err = bd->major; + goto out_unmap; + } + + bd->disk = alloc_disk(1); + if (!bd->disk) { + err = -ENOMEM; + goto out_unregister_blkdev; + } + + bd->disk->queue = blk_init_queue(do_lgb_request, &bd->lock); + if (!bd->disk->queue) { + err = -ENOMEM; + goto out_put_disk; + } + + /* We can only handle a certain number of sg entries */ + blk_queue_max_hw_segments(bd->disk->queue, LGUEST_MAX_DMA_SECTIONS); + /* Buffers must not cross page boundaries */ + blk_queue_segment_boundary(bd->disk->queue, PAGE_SIZE-1); + + sprintf(bd->disk->disk_name, &quot...
2007 May 09
3
[patch 8/9] lguest: the block driver
...< 0) { + err = bd->major; + goto out_unmap; + } + + bd->disk = alloc_disk(1); + if (!bd->disk) { + err = -ENOMEM; + goto out_unregister_blkdev; + } + + bd->disk->queue = blk_init_queue(do_lgb_request, &bd->lock); + if (!bd->disk->queue) { + err = -ENOMEM; + goto out_put_disk; + } + + /* We can only handle a certain number of sg entries */ + blk_queue_max_hw_segments(bd->disk->queue, LGUEST_MAX_DMA_SECTIONS); + /* Buffers must not cross page boundaries */ + blk_queue_segment_boundary(bd->disk->queue, PAGE_SIZE-1); + + sprintf(bd->disk->disk_name, &quot...
2017 Jan 10
0
[PATCH] virtio_blk: fix panic in initialization error path
...diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c > index 5545a679abd8..8587361e5356 100644 > --- a/drivers/block/virtio_blk.c > +++ b/drivers/block/virtio_blk.c > @@ -628,11 +628,12 @@ static int virtblk_probe(struct virtio_device *vdev) > if (err) > goto out_put_disk; > > - q = vblk->disk->queue = blk_mq_init_queue(&vblk->tag_set); > + q = blk_mq_init_queue(&vblk->tag_set); > if (IS_ERR(q)) { > err = -ENOMEM; > goto out_free_tags; > } > + vblk->disk->queue = q; > > q->queuedata = vblk; &...
2020 Jul 15
0
[PATCH] virtio-blk: check host supplied logical block size
...ev) > device_add_disk(&vdev->dev, vblk->disk, virtblk_attr_groups); > return 0; > > +out_cleanup_queue: > + blk_cleanup_queue(vblk->disk->queue); > + vblk->disk->queue = NULL; > out_free_tags: > blk_mq_free_tag_set(&vblk->tag_set); > out_put_disk: > -- > 2.26.2
2020 Jul 15
0
[PATCH] virtio-blk: check host supplied logical block size
...); > > > return 0; > > > > > > +out_cleanup_queue: > > > + blk_cleanup_queue(vblk->disk->queue); > > > + vblk->disk->queue = NULL; > > > out_free_tags: > > > blk_mq_free_tag_set(&vblk->tag_set); > > > out_put_disk: > > > -- > > > 2.26.2 > > > Best regards, > Maxim Levitsky
2020 Jul 21
0
[PATCH 02/10] block: virtio-blk: check logical block size
...ic int virtblk_probe(struct virtio_device *vdev) device_add_disk(&vdev->dev, vblk->disk, virtblk_attr_groups); return 0; +out_cleanup_queue: + blk_cleanup_queue(vblk->disk->queue); + vblk->disk->queue = NULL; out_free_tags: blk_mq_free_tag_set(&vblk->tag_set); out_put_disk: -- 2.26.2
2015 Jan 08
0
[PATCH] virtio_blk: fix blk_mq_init_queue() error handling
...+-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 7ef7c09..b1b5c75 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -638,8 +638,8 @@ static int virtblk_probe(struct virtio_device *vdev) goto out_put_disk; q = vblk->disk->queue = blk_mq_init_queue(&vblk->tag_set); - if (!q) { - err = -ENOMEM; + if (IS_ERR(q)) { + err = PTR_ERR(q); goto out_free_tags; } -- 2.2.1
2015 Jan 08
0
[PATCH] virtio_blk: fix blk_mq_init_queue() error handling
...+-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 7ef7c09..b1b5c75 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -638,8 +638,8 @@ static int virtblk_probe(struct virtio_device *vdev) goto out_put_disk; q = vblk->disk->queue = blk_mq_init_queue(&vblk->tag_set); - if (!q) { - err = -ENOMEM; + if (IS_ERR(q)) { + err = PTR_ERR(q); goto out_free_tags; } -- 2.2.1
2014 Feb 18
0
[PATCH 3.4 22/24] virtio-blk: Use block layer provided spinlock
...;sg_elems); @@ -463,7 +460,7 @@ static int __devinit virtblk_probe(struc goto out_mempool; } - q = vblk->disk->queue = blk_init_queue(do_virtblk_request, &vblk->lock); + q = vblk->disk->queue = blk_init_queue(do_virtblk_request, NULL); if (!q) { err = -ENOMEM; goto out_put_disk;
2014 Feb 18
0
[PATCH 3.4 22/24] virtio-blk: Use block layer provided spinlock
...;sg_elems); @@ -463,7 +460,7 @@ static int __devinit virtblk_probe(struc goto out_mempool; } - q = vblk->disk->queue = blk_init_queue(do_virtblk_request, &vblk->lock); + q = vblk->disk->queue = blk_init_queue(do_virtblk_request, NULL); if (!q) { err = -ENOMEM; goto out_put_disk;