search for: out_cleanup_queue

Displaying 17 results from an estimated 17 matches for "out_cleanup_queue".

2020 Jul 15
3
[PATCH] virtio-blk: check host supplied logical block size
...LK_SIZE, struct virtio_blk_config, blk_size, &blk_size); - if (!err) + if (!err) { + if (!virtblk_valid_block_size(blk_size)) { + dev_err(&vdev->dev, + "%s failure: unsupported logical block size %d\n", + __func__, blk_size); + err = -EINVAL; + goto out_cleanup_queue; + } blk_queue_logical_block_size(q, blk_size); - else + } else blk_size = queue_logical_block_size(q); /* Use topology information if available */ @@ -872,6 +885,9 @@ static int virtblk_probe(struct virtio_device *vdev) device_add_disk(&vdev->dev, vblk->disk, virtblk_attr_gr...
2020 Jul 15
3
[PATCH] virtio-blk: check host supplied logical block size
...LK_SIZE, struct virtio_blk_config, blk_size, &blk_size); - if (!err) + if (!err) { + if (!virtblk_valid_block_size(blk_size)) { + dev_err(&vdev->dev, + "%s failure: unsupported logical block size %d\n", + __func__, blk_size); + err = -EINVAL; + goto out_cleanup_queue; + } blk_queue_logical_block_size(q, blk_size); - else + } else blk_size = queue_logical_block_size(q); /* Use topology information if available */ @@ -872,6 +885,9 @@ static int virtblk_probe(struct virtio_device *vdev) device_add_disk(&vdev->dev, vblk->disk, virtblk_attr_gr...
2020 Jul 15
2
[PATCH] virtio-blk: check host supplied logical block size
...f (!err) > > + if (!err) { > > + if (!virtblk_valid_block_size(blk_size)) { > > + dev_err(&vdev->dev, > > + "%s failure: unsupported logical block > > size %d\n", > > + __func__, blk_size); > > + err = -EINVAL; > > + goto out_cleanup_queue; > > + } > > blk_queue_logical_block_size(q, blk_size); > > - else > > + } else > > blk_size = queue_logical_block_size(q); > > > > /* Use topology information if available */ > > OK so if we are doing this pls add {} around blk_size = &g...
2020 Jul 15
2
[PATCH] virtio-blk: check host supplied logical block size
...f (!err) > > + if (!err) { > > + if (!virtblk_valid_block_size(blk_size)) { > > + dev_err(&vdev->dev, > > + "%s failure: unsupported logical block > > size %d\n", > > + __func__, blk_size); > > + err = -EINVAL; > > + goto out_cleanup_queue; > > + } > > blk_queue_logical_block_size(q, blk_size); > > - else > > + } else > > blk_size = queue_logical_block_size(q); > > > > /* Use topology information if available */ > > OK so if we are doing this pls add {} around blk_size = &g...
2020 Jul 15
0
[PATCH] virtio-blk: check host supplied logical block size
...k_size, > &blk_size); > - if (!err) > + if (!err) { > + if (!virtblk_valid_block_size(blk_size)) { > + dev_err(&vdev->dev, > + "%s failure: unsupported logical block size %d\n", > + __func__, blk_size); > + err = -EINVAL; > + goto out_cleanup_queue; > + } > blk_queue_logical_block_size(q, blk_size); > - else > + } else > blk_size = queue_logical_block_size(q); > > /* Use topology information if available */ OK so if we are doing this pls add {} around blk_size = queue_logical_block_size(q); too. > @@ -872...
2020 Jul 15
0
[PATCH] virtio-blk: check host supplied logical block size
...t; > > + if (!virtblk_valid_block_size(blk_size)) { > > > + dev_err(&vdev->dev, > > > + "%s failure: unsupported logical block > > > size %d\n", > > > + __func__, blk_size); > > > + err = -EINVAL; > > > + goto out_cleanup_queue; > > > + } > > > blk_queue_logical_block_size(q, blk_size); > > > - else > > > + } else > > > blk_size = queue_logical_block_size(q); > > > > > > /* Use topology information if available */ > > > > OK so if we ar...
2020 Jul 21
0
[PATCH 02/10] block: virtio-blk: check logical block size
...SIZE, struct virtio_blk_config, blk_size, &blk_size); - if (!err) + if (!err) { + if (!blk_is_valid_logical_block_size(blk_size)) { + dev_err(&vdev->dev, + "%s failure: invalid logical block size %d\n", + __func__, blk_size); + err = -EINVAL; + goto out_cleanup_queue; + } blk_queue_logical_block_size(q, blk_size); - else + } else { blk_size = queue_logical_block_size(q); + } /* Use topology information if available */ err = virtio_cread_feature(vdev, VIRTIO_BLK_F_TOPOLOGY, @@ -872,6 +880,9 @@ static int virtblk_probe(struct virtio_device *vdev) d...
2007 May 09
3
[patch 8/9] lguest: the block driver
...); + + sprintf(bd->disk->disk_name, "lgb%c", next_block_index++); + if (lguest_devices[lgdev->index].features & LGUEST_DEVICE_F_RANDOMNESS) + irqflags |= IRQF_SAMPLE_RANDOM; + err = request_irq(bd->irq, lgb_irq, irqflags, bd->disk->disk_name, bd); + if (err) + goto out_cleanup_queue; + + hcall(LHCALL_BIND_DMA, bd->phys_addr, __pa(&bd->dma), (1<<8)+bd->irq); + + bd->disk->major = bd->major; + bd->disk->first_minor = 0; + bd->disk->private_data = bd; + bd->disk->fops = &lguestblk_fops; + /* This is initialized to the disk size by...
2007 May 09
3
[patch 8/9] lguest: the block driver
...); + + sprintf(bd->disk->disk_name, "lgb%c", next_block_index++); + if (lguest_devices[lgdev->index].features & LGUEST_DEVICE_F_RANDOMNESS) + irqflags |= IRQF_SAMPLE_RANDOM; + err = request_irq(bd->irq, lgb_irq, irqflags, bd->disk->disk_name, bd); + if (err) + goto out_cleanup_queue; + + hcall(LHCALL_BIND_DMA, bd->phys_addr, __pa(&bd->dma), (1<<8)+bd->irq); + + bd->disk->major = bd->major; + bd->disk->first_minor = 0; + bd->disk->private_data = bd; + bd->disk->fops = &lguestblk_fops; + /* This is initialized to the disk size by...
2020 Jul 21
2
[PATCH 02/10] block: virtio-blk: check logical block size
...ize, > &blk_size); > - if (!err) > + if (!err) { > + if (!blk_is_valid_logical_block_size(blk_size)) { > + dev_err(&vdev->dev, > + "%s failure: invalid logical block size %d\n", > + __func__, blk_size); > + err = -EINVAL; > + goto out_cleanup_queue; > + } > blk_queue_logical_block_size(q, blk_size); Hmm, I wonder if we should simply add the check and warning to blk_queue_logical_block_size and add an error in that case. Then drivers only have to check the error return, which might add a lot less boiler plate code.
2020 Jul 21
2
[PATCH 02/10] block: virtio-blk: check logical block size
...ize, > &blk_size); > - if (!err) > + if (!err) { > + if (!blk_is_valid_logical_block_size(blk_size)) { > + dev_err(&vdev->dev, > + "%s failure: invalid logical block size %d\n", > + __func__, blk_size); > + err = -EINVAL; > + goto out_cleanup_queue; > + } > blk_queue_logical_block_size(q, blk_size); Hmm, I wonder if we should simply add the check and warning to blk_queue_logical_block_size and add an error in that case. Then drivers only have to check the error return, which might add a lot less boiler plate code.
2007 Dec 21
0
[kvm-devel] [Virtio-for-kvm] [PATCH 1/13] [Mostly resend] virtio additions
...e(vdev, VIRTIO_BLK_F_BARRIER)) blk_queue_ordered(vblk->disk->queue, QUEUE_ORDERED_TAG, NULL); - err = virtio_config_val(vdev, VIRTIO_CONFIG_BLK_F_CAPACITY, &cap); - if (err) { - dev_err(&vdev->dev, "Bad/missing capacity in config\n"); - goto out_cleanup_queue; - } + /* Host must always specify the capacity. */ + __virtio_config_val(vdev, offsetof(struct virtio_blk_config, capacity), + &cap); /* If capacity is too big, truncate with warning. */ if ((sector_t)cap != cap) { @@ -234,27 +229,23 @@ static int virtblk_pr...
2007 Dec 21
0
[kvm-devel] [Virtio-for-kvm] [PATCH 1/13] [Mostly resend] virtio additions
...e(vdev, VIRTIO_BLK_F_BARRIER)) blk_queue_ordered(vblk->disk->queue, QUEUE_ORDERED_TAG, NULL); - err = virtio_config_val(vdev, VIRTIO_CONFIG_BLK_F_CAPACITY, &cap); - if (err) { - dev_err(&vdev->dev, "Bad/missing capacity in config\n"); - goto out_cleanup_queue; - } + /* Host must always specify the capacity. */ + __virtio_config_val(vdev, offsetof(struct virtio_blk_config, capacity), + &cap); /* If capacity is too big, truncate with warning. */ if ((sector_t)cap != cap) { @@ -234,27 +229,23 @@ static int virtblk_pr...
2020 Jul 21
17
[PATCH 00/10] RFC: move logical block size checking to the block core
This patch series aims to move the logical block size checking to the block code. This was inspired by missing check for valid logical block size in virtio-blk which causes the kernel to crash in a weird way later on when it is invalid. I added blk_is_valid_logical_block_size which returns true iff the block size is one of supported sizes. I added this check to virtio-blk, and also converted
2020 Jul 21
17
[PATCH 00/10] RFC: move logical block size checking to the block core
This patch series aims to move the logical block size checking to the block code. This was inspired by missing check for valid logical block size in virtio-blk which causes the kernel to crash in a weird way later on when it is invalid. I added blk_is_valid_logical_block_size which returns true iff the block size is one of supported sizes. I added this check to virtio-blk, and also converted
2007 Sep 25
50
[patch 00/43] lguest: Patches for 2.6.24 (and patchbomb test)
Hi all, These are the patches I'm planning to submit for 2.6.24. Comments gratefully accepted. Along with the usual cleanups and improvements are Jes' de-i386-ification patches, and a new "virtio" mechanism designed to be shared with KVM (and hopefully other hypervisors). Cheers, Rusty. Documentation/lguest/Makefile | 30 Documentation/lguest/lguest.c
2007 Sep 25
50
[patch 00/43] lguest: Patches for 2.6.24 (and patchbomb test)
Hi all, These are the patches I'm planning to submit for 2.6.24. Comments gratefully accepted. Along with the usual cleanups and improvements are Jes' de-i386-ification patches, and a new "virtio" mechanism designed to be shared with KVM (and hopefully other hypervisors). Cheers, Rusty. Documentation/lguest/Makefile | 30 Documentation/lguest/lguest.c