search for: virtblk_ioctl

Displaying 20 results from an estimated 37 matches for "virtblk_ioctl".

2019 Dec 11
4
[PATCH 15/24] compat_ioctl: scsi: move ioctl handling into drivers
...fd719d89de..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
...fd719d89de..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
2008 Jan 23
1
[PATCH] virtio_blk: provide getgeo
...virtio_blk.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) Index: kvm/drivers/block/virtio_blk.c =================================================================== --- kvm.orig/drivers/block/virtio_blk.c +++ kvm/drivers/block/virtio_blk.c @@ -154,9 +154,20 @@ static int virtblk_ioctl(struct inode *i (void __user *)data); } +/* We provide getgeo only to please some old bootloader/partitioning tools */ +static int virtblk_getgeo(struct block_device *bd, struct hd_geometry *geo) +{ + /* some standard values, similar to sd */ + geo->heads = 1 << 6; + geo->s...
2008 Jan 23
1
[PATCH] virtio_blk: provide getgeo
...virtio_blk.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) Index: kvm/drivers/block/virtio_blk.c =================================================================== --- kvm.orig/drivers/block/virtio_blk.c +++ kvm/drivers/block/virtio_blk.c @@ -154,9 +154,20 @@ static int virtblk_ioctl(struct inode *i (void __user *)data); } +/* We provide getgeo only to please some old bootloader/partitioning tools */ +static int virtblk_getgeo(struct block_device *bd, struct hd_geometry *geo) +{ + /* some standard values, similar to sd */ + geo->heads = 1 << 6; + geo->s...
2019 Dec 12
4
[PATCH] virtio-blk: remove VIRTIO_BLK_F_SCSI support
...ruct scsi_request *sreq = &vbr->sreq; - - sreq->resid_len = virtio32_to_cpu(vblk->vdev, vbr->in_hdr.residual); - sreq->sense_len = virtio32_to_cpu(vblk->vdev, vbr->in_hdr.sense_len); - sreq->result = virtio32_to_cpu(vblk->vdev, vbr->in_hdr.errors); -} - -static int virtblk_ioctl(struct block_device *bdev, fmode_t mode, - unsigned int cmd, unsigned long data) -{ - struct gendisk *disk = bdev->bd_disk; - struct virtio_blk *vblk = disk->private_data; - - /* - * Only allow the generic SCSI ioctls if the host can support it. - */ - if (!virtio_has_feature(vblk-&g...
2008 Apr 16
1
[PATCH] add virtio disk geometry feature
...Ryan Harper <ryanh at us.ibm.com> Reviewed-by: Anthony Liguori <aliguori at us.ibm.com> diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 0cfbe8c..1d2142a 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -157,10 +157,28 @@ static int virtblk_ioctl(struct inode *inode, struct file *filp, /* We provide getgeo only to please some old bootloader/partitioning tools */ static int virtblk_getgeo(struct block_device *bd, struct hd_geometry *geo) { - /* some standard values, similar to sd */ - geo->heads = 1 << 6; - geo->sectors = 1 &l...
2008 Apr 16
1
[PATCH] add virtio disk geometry feature
...Ryan Harper <ryanh at us.ibm.com> Reviewed-by: Anthony Liguori <aliguori at us.ibm.com> diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 0cfbe8c..1d2142a 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -157,10 +157,28 @@ static int virtblk_ioctl(struct inode *inode, struct file *filp, /* We provide getgeo only to please some old bootloader/partitioning tools */ static int virtblk_getgeo(struct block_device *bd, struct hd_geometry *geo) { - /* some standard values, similar to sd */ - geo->heads = 1 << 6; - geo->sectors = 1 &l...
2012 Nov 15
1
virtio_blk BUG on detach-disk/attach-disk of mounted vd
...813d0bfb ffff880118c6bf58 0000000000005331 00000000ffffffe7 [ 75.115084] 0000000000000000 ffff88011ac28680 ffff88011ab5d000 ffff880118c6be78 [ 75.115087] ffffffff812bd1be ffff880115a85180 ffff88011ac28680 ffff880118c6bee8 [ 75.115090] Call Trace: [ 75.115101] [<ffffffff813d0bfb>] ? virtblk_ioctl+0x4b/0x90 [ 75.115118] [<ffffffff812bd1be>] blkdev_ioctl+0xde/0x830 [ 75.115130] [<ffffffff8118b406>] ? cp_new_stat+0x116/0x130 [ 75.115140] [<ffffffff811bc940>] block_ioctl+0x40/0x50 [ 75.115146] [<ffffffff81197ac8>] do_vfs_ioctl+0x98/0x550 [ 75.115149] [<...
2012 Nov 15
1
virtio_blk BUG on detach-disk/attach-disk of mounted vd
...813d0bfb ffff880118c6bf58 0000000000005331 00000000ffffffe7 [ 75.115084] 0000000000000000 ffff88011ac28680 ffff88011ab5d000 ffff880118c6be78 [ 75.115087] ffffffff812bd1be ffff880115a85180 ffff88011ac28680 ffff880118c6bee8 [ 75.115090] Call Trace: [ 75.115101] [<ffffffff813d0bfb>] ? virtblk_ioctl+0x4b/0x90 [ 75.115118] [<ffffffff812bd1be>] blkdev_ioctl+0xde/0x830 [ 75.115130] [<ffffffff8118b406>] ? cp_new_stat+0x116/0x130 [ 75.115140] [<ffffffff811bc940>] block_ioctl+0x40/0x50 [ 75.115146] [<ffffffff81197ac8>] do_vfs_ioctl+0x98/0x550 [ 75.115149] [<...
2017 Jan 28
6
make SCSI passthrough support optional
Hi all, this series builds on my previous changes in Jens' for-4.11/rq-refactor branch that split out the BLOCK_PC fields from struct request into a new struct scsi_request, and makes support for struct scsi_request and the SCSI passthrough ioctls optional. It is now only enabled by drivers that need it. In addition I've made SCSI passthrough support in the virtio_blk driver an optional
2017 Jan 28
6
make SCSI passthrough support optional
Hi all, this series builds on my previous changes in Jens' for-4.11/rq-refactor branch that split out the BLOCK_PC fields from struct request into a new struct scsi_request, and makes support for struct scsi_request and the SCSI passthrough ioctls optional. It is now only enabled by drivers that need it. In addition I've made SCSI passthrough support in the virtio_blk driver an optional
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 it's because the only ioctl for vi...
2017 Sep 15
2
Regression in virtio block driver with 4.13.2
...00080050033 [ 5.914567] CR2: 00007fff67496fe8 CR3: 0000000079ee2000 CR4: 00000000000006e0 [ 5.914588] Call Trace: [ 5.914599] sg_io+0xe2/0x400 [ 5.914611] ? __might_fault+0x85/0x90 [ 5.914622] scsi_cmd_ioctl+0x2e0/0x4a0 [ 5.914637] scsi_cmd_blk_ioctl+0x42/0x50 [ 5.914651] virtblk_ioctl+0x56/0x70 [virtio_blk] [ 5.914666] blkdev_ioctl+0x8f7/0x9b0 [ 5.914679] block_ioctl+0x43/0x50 [ 5.914689] do_vfs_ioctl+0xa6/0x6c0 [ 5.914702] SyS_ioctl+0x79/0x90 [ 5.914714] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 5.914727] RIP: 0033:0x7f03e3b220d7 [ 5.914737] RSP: 002b:0000...
2017 Sep 15
2
Regression in virtio block driver with 4.13.2
...00080050033 [ 5.914567] CR2: 00007fff67496fe8 CR3: 0000000079ee2000 CR4: 00000000000006e0 [ 5.914588] Call Trace: [ 5.914599] sg_io+0xe2/0x400 [ 5.914611] ? __might_fault+0x85/0x90 [ 5.914622] scsi_cmd_ioctl+0x2e0/0x4a0 [ 5.914637] scsi_cmd_blk_ioctl+0x42/0x50 [ 5.914651] virtblk_ioctl+0x56/0x70 [virtio_blk] [ 5.914666] blkdev_ioctl+0x8f7/0x9b0 [ 5.914679] block_ioctl+0x43/0x50 [ 5.914689] do_vfs_ioctl+0xa6/0x6c0 [ 5.914702] SyS_ioctl+0x79/0x90 [ 5.914714] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 5.914727] RIP: 0033:0x7f03e3b220d7 [ 5.914737] RSP: 002b:0000...
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
2010 Jun 24
3
[PATCH 0/2] v2: Add 'serial' attribute to virtio-blk devices
Using Rusty's suggestion I've respun the patch removing the special copy function. I've tested this patch in a guest kernel with and without qemu supplying serial numbers for the block devices and it's working as expected. When qemu supplies serial numbers, the correct value is supplied to /sys/block/vdX/serial and can be used by udev for generating disk/by-id paths (without
2010 Jun 24
3
[PATCH 0/2] v2: Add 'serial' attribute to virtio-blk devices
Using Rusty's suggestion I've respun the patch removing the special copy function. I've tested this patch in a guest kernel with and without qemu supplying serial numbers for the block devices and it's working as expected. When qemu supplies serial numbers, the correct value is supplied to /sys/block/vdX/serial and can be used by udev for generating disk/by-id paths (without
2020 May 14
0
[PATCH AUTOSEL 4.19 22/31] virtio-blk: handle block_device_operations callbacks after hot unplug
...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 = { .ioctl = virtblk_ioctl, .owner = THIS_MODULE, + .open = virtblk_open, + .release = virtblk_release, .getgeo = virtblk_getgeo, }; @@ -672,6 +737,10 @@ static int virtblk_probe(struct virtio_device *vdev) goto out_free_index; } + /* This reference is dropped in virtblk_remove(). */ + refcount_set(&vblk-&...
2020 May 14
0
[PATCH AUTOSEL 4.14 31/39] virtio-blk: handle block_device_operations callbacks after hot unplug
...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 = { .ioctl = virtblk_ioctl, .owner = THIS_MODULE, + .open = virtblk_open, + .release = virtblk_release, .getgeo = virtblk_getgeo, }; @@ -659,6 +724,10 @@ static int virtblk_probe(struct virtio_device *vdev) goto out_free_index; } + /* This reference is dropped in virtblk_remove(). */ + refcount_set(&vblk-&...