search for: driverfs_dev

Displaying 20 results from an estimated 57 matches for "driverfs_dev".

2011 Jun 01
6
[PATCH 1/1] [virt] virtio-blk: Use ida to allocate disk index
...e 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_index: + spin_lock(&vd_index_lock...
2011 Jun 01
6
[PATCH 1/1] [virt] virtio-blk: Use ida to allocate disk index
...e 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_index: + spin_lock(&vd_index_lock...
2013 May 13
22
[PATCH] xen-blk(front|back): Handle large physical sector disks
...struct blkfront_info *info, - u16 vdisk_info, u16 sector_size) + u16 vdisk_info, u16 sector_size, + unsigned int physical_sector_size) { struct gendisk *gd; int nr_minors = 1; @@ -734,7 +737,7 @@ static int xlvbd_alloc_gendisk(blkif_sector_t capacity, gd->driverfs_dev = &(info->xbdev->dev); set_capacity(gd, capacity); - if (xlvbd_init_blk_queue(gd, sector_size)) { + if (xlvbd_init_blk_queue(gd, sector_size, physical_sector_size)) { del_gendisk(gd); goto release; } @@ -1395,6 +1398,7 @@ static void blkfront_connect(struct blkfront_info *info)...
2015 Jun 23
0
[PATCH] virtio-blk: Allow extended partitions
...vers/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
...vers/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
2016 Jun 30
0
[PATCH v2 02/12] genhd: Honor gen_uevent and add disk_gen_uevents
...rn 0; } -static void register_disk(struct gendisk *disk) +static void register_disk(struct gendisk *disk, bool gen_uevent) { struct device *ddev = disk_to_dev(disk); struct block_device *bdev; - struct disk_part_iter piter; - struct hd_struct *part; int err; ddev->parent = disk->driverfs_dev; @@ -563,6 +561,22 @@ static void register_disk(struct gendisk *disk) exit: /* announce disk after possible partitions are created */ dev_set_uevent_suppress(ddev, 0); + if (gen_uevent) + disk_gen_uevents(disk); +} + +/** + * disk_gen_uevents + * @disk - the disk to generate uevent + * + * Ge...
2016 Jun 30
0
[PATCH v2 00/12] gendisk: Generate uevent after attribute available
...offending callers. The approach I'm proposing here is adding a flag to > suppress uevent in add_disk(), which is patch 1, then in later patches, convert > any caller to only trigger the uevent when attributes are added. We (or rather Dan) is touching most add_disk callers anyway for the driverfs_dev removal. Let's just pass the array of attributes to a disk_add variant and solve the issue for real.
2016 Jun 30
2
[PATCH v2 00/12] gendisk: Generate uevent after attribute available
...pproach I'm proposing here is adding a flag to > > suppress uevent in add_disk(), which is patch 1, then in later patches, convert > > any caller to only trigger the uevent when attributes are added. > > We (or rather Dan) is touching most add_disk callers anyway for the > driverfs_dev removal. Let's just pass the array of attributes to > a disk_add variant and solve the issue for real. I thought about that. Its usage is more compact compared to this series, but is also more code and less flexible IMO. For example, we need at least two variants, for attribute_group and...
2015 Jun 23
0
[PATCH] virtio-blk: Allow extended partitions
...vers/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
...vers/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
2016 Jun 30
2
[PATCH v2 00/12] gendisk: Generate uevent after attribute available
...pproach I'm proposing here is adding a flag to > > suppress uevent in add_disk(), which is patch 1, then in later patches, convert > > any caller to only trigger the uevent when attributes are added. > > We (or rather Dan) is touching most add_disk callers anyway for the > driverfs_dev removal. Let's just pass the array of attributes to > a disk_add variant and solve the issue for real. I thought about that. Its usage is more compact compared to this series, but is also more code and less flexible IMO. For example, we need at least two variants, for attribute_group and...
2009 Sep 21
0
[PATCH 5/6] virtio_blk: set QUEUE_ORDERED_DRAIN by default
...========================================================== --- linux-2.6.orig/drivers/block/virtio_blk.c 2009-08-20 17:41:37.019718433 -0300 +++ linux-2.6/drivers/block/virtio_blk.c 2009-08-20 17:45:40.511747922 -0300 @@ -336,9 +336,16 @@ static int __devinit virtblk_probe(struc vblk->disk->driverfs_dev = &vdev->dev; index++; - /* If barriers are supported, tell block layer that queue is ordered */ + /* + * If barriers are supported, tell block layer that queue is ordered. + * + * If no barriers are supported assume the host uses synchronous + * writes and just drain the the queue b...
2010 Dec 17
0
[PATCH] Staging: hv: Add code to create the device directory under /sys/block/hdx
...b8094 100644 --- a/drivers/staging/hv/blkvsc_drv.c +++ b/drivers/staging/hv/blkvsc_drv.c @@ -368,6 +368,7 @@ static int blkvsc_probe(struct device *device) blkdev->gd->first_minor = 0; blkdev->gd->fops = &block_ops; blkdev->gd->private_data = blkdev; + blkdev->gd->driverfs_dev = &(blkdev->device_ctx->device); sprintf(blkdev->gd->disk_name, "hd%c", 'a' + devnum); blkvsc_do_inquiry(blkdev); -- 1.7.1
2009 Sep 21
0
[PATCH 5/6] virtio_blk: set QUEUE_ORDERED_DRAIN by default
...========================================================== --- linux-2.6.orig/drivers/block/virtio_blk.c 2009-08-20 17:41:37.019718433 -0300 +++ linux-2.6/drivers/block/virtio_blk.c 2009-08-20 17:45:40.511747922 -0300 @@ -336,9 +336,16 @@ static int __devinit virtblk_probe(struc vblk->disk->driverfs_dev = &vdev->dev; index++; - /* If barriers are supported, tell block layer that queue is ordered */ + /* + * If barriers are supported, tell block layer that queue is ordered. + * + * If no barriers are supported assume the host uses synchronous + * writes and just drain the the queue b...
2010 Dec 17
0
[PATCH] Staging: hv: Add code to create the device directory under /sys/block/hdx
...b8094 100644 --- a/drivers/staging/hv/blkvsc_drv.c +++ b/drivers/staging/hv/blkvsc_drv.c @@ -368,6 +368,7 @@ static int blkvsc_probe(struct device *device) blkdev->gd->first_minor = 0; blkdev->gd->fops = &block_ops; blkdev->gd->private_data = blkdev; + blkdev->gd->driverfs_dev = &(blkdev->device_ctx->device); sprintf(blkdev->gd->disk_name, "hd%c", 'a' + devnum); blkvsc_do_inquiry(blkdev); -- 1.7.1
2011 Oct 30
2
[PATCHv4] virtio-blk: use ida to allocate disk index
...(!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_index: + ida_simple_remove(&vd_ind...
2011 Oct 30
2
[PATCHv4] virtio-blk: use ida to allocate disk index
...(!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_index: + ida_simple_remove(&vd_ind...
2008 Mar 11
3
[PATCH 1/4] virtio: Use spin_lock_irqsave/restore for virtio-pci
From: Anthony Liguori <aliguori at us.ibm.com> virtio-pci acquires its spin lock in an interrupt context so it's necessary to use spin_lock_irqsave/restore variants. This patch fixes guest SMP when using virtio devices in KVM. Signed-off-by: Anthony Liguori <aliguori at us.ibm.com> Signed-off-by: Rusty Russell <rusty at rustcorp.com.au> --- drivers/virtio/virtio_pci.c |
2008 Mar 11
3
[PATCH 1/4] virtio: Use spin_lock_irqsave/restore for virtio-pci
From: Anthony Liguori <aliguori at us.ibm.com> virtio-pci acquires its spin lock in an interrupt context so it's necessary to use spin_lock_irqsave/restore variants. This patch fixes guest SMP when using virtio devices in KVM. Signed-off-by: Anthony Liguori <aliguori at us.ibm.com> Signed-off-by: Rusty Russell <rusty at rustcorp.com.au> --- drivers/virtio/virtio_pci.c |
2016 Jun 30
17
[PATCH v2 00/12] gendisk: Generate uevent after attribute available
The race condition is noticed between disk_add() and disk attributes, on virtio-blk hotplug. Userspace listens to the KOBJ_ADD uevent generated in add_disk(). At that point we haven't created the serial attribute file, therefore depending on how fast udev reacts, the /dev/disk/by-id/ entry doesn't always get created. As pointed out by Christoph Hellwig in the specific fix [1], virtio-blk