Displaying 20 results from an estimated 45 matches for "virtblk_fops".
2019 Dec 11
4
[PATCH 15/24] compat_ioctl: scsi: move ioctl handling into drivers
...s/block/virtio_blk.c
> index 7ffd719d89de..fbbf18ac1d5d 100644
> --- a/drivers/block/virtio_blk.c
> +++ b/drivers/block/virtio_blk.c
> @@ -405,6 +405,9 @@ static int virtblk_getgeo(struct block_device *bd, struct hd_geometry *geo)
>
> static const struct block_device_operations virtblk_fops = {
> .ioctl = virtblk_ioctl,
> +#ifdef CONFIG_COMPAT
> + .compat_ioctl = blkdev_compat_ptr_ioctl,
> +#endif
> .owner = THIS_MODULE,
> .getgeo = virtblk_getgeo,
> };
Hmm - is virtio blk lumped in with scsi things intentionally?
--
MST
2019 Dec 11
4
[PATCH 15/24] compat_ioctl: scsi: move ioctl handling into drivers
...s/block/virtio_blk.c
> index 7ffd719d89de..fbbf18ac1d5d 100644
> --- a/drivers/block/virtio_blk.c
> +++ b/drivers/block/virtio_blk.c
> @@ -405,6 +405,9 @@ static int virtblk_getgeo(struct block_device *bd, struct hd_geometry *geo)
>
> static const struct block_device_operations virtblk_fops = {
> .ioctl = virtblk_ioctl,
> +#ifdef CONFIG_COMPAT
> + .compat_ioctl = blkdev_compat_ptr_ioctl,
> +#endif
> .owner = THIS_MODULE,
> .getgeo = virtblk_getgeo,
> };
Hmm - is virtio blk lumped in with scsi things intentionally?
--
MST
2011 Jun 01
6
[PATCH 1/1] [virt] virtio-blk: Use ida to allocate disk index
...goto out_free_index;
+ }
/* We need to know how many segments before we allocate. */
err = virtio_config_val(vdev, VIRTIO_BLK_F_SEG_MAX,
@@ -421,7 +440,7 @@ static int __devinit virtblk_probe(struct virtio_device *vdev)
vblk->disk->private_data = vblk;
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_ind...
2011 Jun 01
6
[PATCH 1/1] [virt] virtio-blk: Use ida to allocate disk index
...goto out_free_index;
+ }
/* We need to know how many segments before we allocate. */
err = virtio_config_val(vdev, VIRTIO_BLK_F_SEG_MAX,
@@ -421,7 +440,7 @@ static int __devinit virtblk_probe(struct virtio_device *vdev)
vblk->disk->private_data = vblk;
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_ind...
2020 Apr 28
2
[PATCH v2] virtio-blk: handle block_device_operations callbacks after hot unplug
...getgeo(struct block_device *bd, struct hd_geometry *geo)
geo->sectors = 1 << 5;
geo->cylinders = get_capacity(bd->bd_disk) >> 11;
}
- return 0;
+
+ ret = 0;
+out:
+ mutex_unlock(&vblk->remove_mutex);
+ return ret;
}
static const struct block_device_operations virtblk_fops = {
.owner = THIS_MODULE,
+ .open = virtblk_open,
+ .release = virtblk_release,
.getgeo = virtblk_getgeo,
};
@@ -655,6 +715,10 @@ static int virtblk_probe(struct virtio_device *vdev)
goto out_free_index;
}
+ /* This reference is dropped in virtblk_remove(). */
+ refcount_set(&vbl...
2020 Apr 28
2
[PATCH v2] virtio-blk: handle block_device_operations callbacks after hot unplug
...getgeo(struct block_device *bd, struct hd_geometry *geo)
geo->sectors = 1 << 5;
geo->cylinders = get_capacity(bd->bd_disk) >> 11;
}
- return 0;
+
+ ret = 0;
+out:
+ mutex_unlock(&vblk->remove_mutex);
+ return ret;
}
static const struct block_device_operations virtblk_fops = {
.owner = THIS_MODULE,
+ .open = virtblk_open,
+ .release = virtblk_release,
.getgeo = virtblk_getgeo,
};
@@ -655,6 +715,10 @@ static int virtblk_probe(struct virtio_device *vdev)
goto out_free_index;
}
+ /* This reference is dropped in virtblk_remove(). */
+ refcount_set(&vbl...
2015 Jun 23
0
[PATCH] virtio-blk: Allow extended partitions
...a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index 5ea2f0b..97daa70 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -657,6 +657,7 @@ static int virtblk_probe(struct virtio_device *vdev)
vblk->disk->private_data = vblk;
vblk->disk->fops = &virtblk_fops;
vblk->disk->driverfs_dev = &vdev->dev;
+ vblk->disk->flags |= GENHD_FL_EXT_DEVT;
vblk->index = index;
/* configure queue flush support */
--
2.4.2
2015 Sep 06
0
[PATCH v2] virtio-blk: Allow extended partitions
...a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index d4d05f0..38ea01b 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -657,6 +657,7 @@ static int virtblk_probe(struct virtio_device *vdev)
vblk->disk->private_data = vblk;
vblk->disk->fops = &virtblk_fops;
vblk->disk->driverfs_dev = &vdev->dev;
+ vblk->disk->flags |= GENHD_FL_EXT_DEVT;
vblk->index = index;
/* configure queue flush support */
--
2.4.3
2019 Dec 12
0
[PATCH 15/24] compat_ioctl: scsi: move ioctl handling into drivers
On 12/12/19 00:05, Michael S. Tsirkin wrote:
>> @@ -405,6 +405,9 @@ static int virtblk_getgeo(struct block_device *bd, struct hd_geometry *geo)
>>
>> static const struct block_device_operations virtblk_fops = {
>> .ioctl = virtblk_ioctl,
>> +#ifdef CONFIG_COMPAT
>> + .compat_ioctl = blkdev_compat_ptr_ioctl,
>> +#endif
>> .owner = THIS_MODULE,
>> .getgeo = virtblk_getgeo,
>> };
> Hmm - is virtio blk lumped in with scsi things intentionally?
I think...
2015 Jun 23
0
[PATCH] virtio-blk: Allow extended partitions
...a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index 5ea2f0b..97daa70 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -657,6 +657,7 @@ static int virtblk_probe(struct virtio_device *vdev)
vblk->disk->private_data = vblk;
vblk->disk->fops = &virtblk_fops;
vblk->disk->driverfs_dev = &vdev->dev;
+ vblk->disk->flags |= GENHD_FL_EXT_DEVT;
vblk->index = index;
/* configure queue flush support */
--
2.4.2
2015 Sep 06
0
[PATCH v2] virtio-blk: Allow extended partitions
...a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index d4d05f0..38ea01b 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -657,6 +657,7 @@ static int virtblk_probe(struct virtio_device *vdev)
vblk->disk->private_data = vblk;
vblk->disk->fops = &virtblk_fops;
vblk->disk->driverfs_dev = &vdev->dev;
+ vblk->disk->flags |= GENHD_FL_EXT_DEVT;
vblk->index = index;
/* configure queue flush support */
--
2.4.3
2008 Jan 23
1
[PATCH] virtio_blk: provide getgeo
...t virtblk_getgeo(struct block_device *bd, struct hd_geometry *geo)
+{
+ /* some standard values, similar to sd */
+ geo->heads = 1 << 6;
+ geo->sectors = 1 << 5;
+ geo->cylinders = get_capacity(bd->bd_disk) >> 11;
+ return 0;
+}
+
static struct block_device_operations virtblk_fops = {
- .ioctl = virtblk_ioctl,
- .owner = THIS_MODULE,
+ .ioctl = virtblk_ioctl,
+ .owner = THIS_MODULE,
+ .getgeo = virtblk_getgeo,
};
static int virtblk_probe(struct virtio_device *vdev)
2008 Jan 23
1
[PATCH] virtio_blk: provide getgeo
...t virtblk_getgeo(struct block_device *bd, struct hd_geometry *geo)
+{
+ /* some standard values, similar to sd */
+ geo->heads = 1 << 6;
+ geo->sectors = 1 << 5;
+ geo->cylinders = get_capacity(bd->bd_disk) >> 11;
+ return 0;
+}
+
static struct block_device_operations virtblk_fops = {
- .ioctl = virtblk_ioctl,
- .owner = THIS_MODULE,
+ .ioctl = virtblk_ioctl,
+ .owner = THIS_MODULE,
+ .getgeo = virtblk_getgeo,
};
static int virtblk_probe(struct virtio_device *vdev)
2020 Apr 28
1
[PATCH v2] virtio-blk: handle block_device_operations callbacks after hot unplug
...gt;cylinders = get_capacity(bd->bd_disk) >> 11;
> > }
> > - return 0;
> > +
> > + ret = 0;
> > +out:
> > + mutex_unlock(&vblk->remove_mutex);
> > + return ret;
> > }
> >
> > static const struct block_device_operations virtblk_fops = {
> > .owner = THIS_MODULE,
> > + .open = virtblk_open,
> > + .release = virtblk_release,
> > .getgeo = virtblk_getgeo,
> > };
> >
> > @@ -655,6 +715,10 @@ static int virtblk_probe(struct virtio_device *vdev)
> > goto out_free_index;
>...
2019 Dec 12
4
[PATCH] virtio-blk: remove VIRTIO_BLK_F_SCSI support
...+ err = virtblk_add_req(vblk->vqs[qid].vq, vbr, vbr->sg, num);
if (err) {
virtqueue_kick(vblk->vqs[qid].vq);
blk_mq_stop_hw_queue(hctx);
@@ -404,7 +310,6 @@ static int virtblk_getgeo(struct block_device *bd, struct hd_geometry *geo)
}
static const struct block_device_operations virtblk_fops = {
- .ioctl = virtblk_ioctl,
.owner = THIS_MODULE,
.getgeo = virtblk_getgeo,
};
@@ -683,9 +588,6 @@ static int virtblk_init_request(struct blk_mq_tag_set *set, struct request *rq,
struct virtio_blk *vblk = set->driver_data;
struct virtblk_req *vbr = blk_mq_rq_to_pdu(rq);
-#ifdef CO...
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
2020 Apr 29
2
[PATCH v3] virtio-blk: handle block_device_operations callbacks after hot unplug
...ic int virtblk_getgeo(struct block_device *bd, struct hd_geometry *geo)
geo->sectors = 1 << 5;
geo->cylinders = get_capacity(bd->bd_disk) >> 11;
}
- return 0;
+out:
+ mutex_unlock(&vblk->vdev_mutex);
+ return ret;
}
static const struct block_device_operations virtblk_fops = {
.owner = THIS_MODULE,
+ .open = virtblk_open,
+ .release = virtblk_release,
.getgeo = virtblk_getgeo,
};
@@ -655,6 +721,10 @@ static int virtblk_probe(struct virtio_device *vdev)
goto out_free_index;
}
+ /* This reference is dropped in virtblk_remove(). */
+ refcount_set(&vbl...
2020 Apr 29
2
[PATCH v3] virtio-blk: handle block_device_operations callbacks after hot unplug
...ic int virtblk_getgeo(struct block_device *bd, struct hd_geometry *geo)
geo->sectors = 1 << 5;
geo->cylinders = get_capacity(bd->bd_disk) >> 11;
}
- return 0;
+out:
+ mutex_unlock(&vblk->vdev_mutex);
+ return ret;
}
static const struct block_device_operations virtblk_fops = {
.owner = THIS_MODULE,
+ .open = virtblk_open,
+ .release = virtblk_release,
.getgeo = virtblk_getgeo,
};
@@ -655,6 +721,10 @@ static int virtblk_probe(struct virtio_device *vdev)
goto out_free_index;
}
+ /* This reference is dropped in virtblk_remove(). */
+ refcount_set(&vbl...
2011 Oct 30
2
[PATCHv4] virtio-blk: use ida to allocate disk index
...[0]) * sg_elems, GFP_KERNEL);
if (!vblk) {
err = -ENOMEM;
- goto out;
+ goto out_free_index;
}
INIT_LIST_HEAD(&vblk->reqs);
@@ -421,7 +435,7 @@ static int __devinit virtblk_probe(struct virtio_device *vdev)
vblk->disk->private_data = vblk;
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 +530,8 @@ out_free_vq:
vdev->config->del_vqs(vdev);
out_free_vblk:
kfree(vblk);
+out_free_inde...