search for: out_del_disk

Displaying 13 results from an estimated 13 matches for "out_del_disk".

2016 Aug 17
0
[PATCH 09/15] virtio-blk: Pass attribute group to device_add_disk
...re: config access disabled\n", @@ -719,19 +740,14 @@ static int virtblk_probe(struct virtio_device *vdev) virtio_device_ready(vdev); - device_add_disk(&vdev->dev, vblk->disk, NULL); - err = device_create_file(disk_to_dev(vblk->disk), &dev_attr_serial); - if (err) - goto out_del_disk; - if (virtio_has_feature(vdev, VIRTIO_BLK_F_CONFIG_WCE)) - err = device_create_file(disk_to_dev(vblk->disk), - &dev_attr_cache_type_rw); + attr_group = &virtblk_attr_group_rw; else - err = device_create_file(disk_to_dev(vblk->disk), - &dev_attr_cache_type_ro); +...
2010 Jun 18
4
[PATCH 1/2] Add 'serial' attribute to virtio-blk devices
...c int __devinit virtblk_probe(struct virtio_device *vdev) { struct virtio_blk *vblk; @@ -445,8 +470,15 @@ static int __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
...c int __devinit virtblk_probe(struct virtio_device *vdev) { struct virtio_blk *vblk; @@ -445,8 +470,15 @@ static int __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
2016 Jun 28
2
[PATCH] virtio-blk: Generate uevent after attribute available
...7,7 @@ static int virtblk_probe(struct virtio_device *vdev) { struct virtio_blk *vblk; struct request_queue *q; + struct device *ddev; int err, index; u64 cap; @@ -746,6 +747,8 @@ static int virtblk_probe(struct virtio_device *vdev) &dev_attr_cache_type_ro); if (err) goto out_del_disk; + ddev = disk_to_dev(vblk->disk); + kobject_uevent(&ddev->kobj, KOBJ_CHANGE); return 0; out_del_disk: -- 2.9.0
2016 Jun 28
2
[PATCH] virtio-blk: Generate uevent after attribute available
...7,7 @@ static int virtblk_probe(struct virtio_device *vdev) { struct virtio_blk *vblk; struct request_queue *q; + struct device *ddev; int err, index; u64 cap; @@ -746,6 +747,8 @@ static int virtblk_probe(struct virtio_device *vdev) &dev_attr_cache_type_ro); if (err) goto out_del_disk; + ddev = disk_to_dev(vblk->disk); + kobject_uevent(&ddev->kobj, KOBJ_CHANGE); return 0; out_del_disk: -- 2.9.0
2012 Jul 04
1
[PATCH] virtio-blk: allow toggling host cache between writeback and writethrough
...REQ_FLUSH); > + virtblk_update_cache_mode(vdev); > > /* If disk is read-only in the host, the guest should obey */ > if (virtio_has_feature(vdev, VIRTIO_BLK_F_RO)) > @@ -553,6 +627,14 @@ static int __devinit virtblk_probe(struct virtio_device *vdev) > if (err) > goto out_del_disk; > > + if (virtio_has_feature(vdev, VIRTIO_BLK_F_CONFIG_WCE)) > + err = device_create_file(disk_to_dev(vblk->disk), > + &dev_attr_cache_type_rw); > + else > + err = device_create_file(disk_to_dev(vblk->disk), > + &dev_attr_cache_type_ro); > + if (...
2012 Jul 04
1
[PATCH] virtio-blk: allow toggling host cache between writeback and writethrough
...REQ_FLUSH); > + virtblk_update_cache_mode(vdev); > > /* If disk is read-only in the host, the guest should obey */ > if (virtio_has_feature(vdev, VIRTIO_BLK_F_RO)) > @@ -553,6 +627,14 @@ static int __devinit virtblk_probe(struct virtio_device *vdev) > if (err) > goto out_del_disk; > > + if (virtio_has_feature(vdev, VIRTIO_BLK_F_CONFIG_WCE)) > + err = device_create_file(disk_to_dev(vblk->disk), > + &dev_attr_cache_type_rw); > + else > + err = device_create_file(disk_to_dev(vblk->disk), > + &dev_attr_cache_type_ro); > + if (...
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
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
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
2016 Aug 17
20
[PATCH 00/15] Fix issue with KOBJ_ADD uevent versus disk attributes
This is an attempt to fix the issue that some disks' sysfs attributes are not ready at the time its KOBJ_ADD event is sent. The symptom is during device hotplug, udev may fail to find certain attributes, such as serial or wwn, of the disk. As a result the /dev/disk/by-id entries are not created. The cause is device_add_disk emits the uevent before returning, and the callers have to create
2016 Aug 17
20
[PATCH 00/15] Fix issue with KOBJ_ADD uevent versus disk attributes
This is an attempt to fix the issue that some disks' sysfs attributes are not ready at the time its KOBJ_ADD event is sent. The symptom is during device hotplug, udev may fail to find certain attributes, such as serial or wwn, of the disk. As a result the /dev/disk/by-id entries are not created. The cause is device_add_disk emits the uevent before returning, and the callers have to create