search for: add_disk

Displaying 20 results from an estimated 173 matches for "add_disk".

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 is not the only driver that suffers from this, so we ca...
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 is not the only driver that suffers from this, so we ca...
2016 Jun 30
1
[PATCH v2 04/12] axonrom: Generate uevent after attribute available
...latform_device *device) > set_capacity(bank->disk, bank->size >> AXON_RAM_SECTOR_SHIFT); > blk_queue_make_request(bank->disk->queue, axon_ram_make_request); > blk_queue_logical_block_size(bank->disk->queue, AXON_RAM_SECTOR_SIZE); > - add_disk(bank->disk, true); > + add_disk(bank->disk, false); > > bank->irq_id = irq_of_parse_and_map(device->dev.of_node, 0); > if (bank->irq_id == NO_IRQ) { > @@ -262,6 +262,7 @@ static int axon_ram_probe(struct platform_device *device) >...
2016 Jun 30
1
[PATCH v2 04/12] axonrom: Generate uevent after attribute available
...latform_device *device) > set_capacity(bank->disk, bank->size >> AXON_RAM_SECTOR_SHIFT); > blk_queue_make_request(bank->disk->queue, axon_ram_make_request); > blk_queue_logical_block_size(bank->disk->queue, AXON_RAM_SECTOR_SIZE); > - add_disk(bank->disk, true); > + add_disk(bank->disk, false); > > bank->irq_id = irq_of_parse_and_map(device->dev.of_node, 0); > if (bank->irq_id == NO_IRQ) { > @@ -262,6 +262,7 @@ static int axon_ram_probe(struct platform_device *device) >...
2018 Aug 14
2
[PATCH] v2v: parse_libvirt_xml: number disks from 0 (RHBZ#1615885)
...deletion(-) diff --git a/v2v/parse_libvirt_xml.ml b/v2v/parse_libvirt_xml.ml index 78a6e71c0..dac99511c 100644 --- a/v2v/parse_libvirt_xml.ml +++ b/v2v/parse_libvirt_xml.ml @@ -246,7 +246,7 @@ let parse_libvirt_xml ?conn xml = (* Non-removable disk devices. *) let disks = let get_disks, add_disk = - let disks = ref [] and i = ref 0 in + let disks = ref [] and i = ref (-1) in let get_disks () = List.rev !disks in let add_disk qemu_uri format controller p_source = incr i; -- 2.17.1
2018 Aug 14
2
Re: [PATCH] v2v: parse_libvirt_xml: number disks from 0 (RHBZ#1615885)
..._xml.ml > > index 78a6e71c0..dac99511c 100644 > > --- a/v2v/parse_libvirt_xml.ml > > +++ b/v2v/parse_libvirt_xml.ml > > @@ -246,7 +246,7 @@ let parse_libvirt_xml ?conn xml = > > (* Non-removable disk devices. *) > > let disks = > > let get_disks, add_disk = > > - let disks = ref [] and i = ref 0 in > > + let disks = ref [] and i = ref (-1) in > > let get_disks () = List.rev !disks in > > let add_disk qemu_uri format controller p_source = > > incr i; > > NACK. The s_disk_id field...
2018 Feb 18
0
[PATCH 2/3] v2v: ovf: Create OVF more aligned with the standard
..."Content" ["ovf:id", "out"; "xsi:type", "ovf:VirtualSystem_Type"] + !content_subnodes + else + e "VirtualSystem" ["ovf:id", "out"] !content_subnodes ] in (* Add disks to the OVF XML. *) - add_disks targets guestcaps output_alloc sd_uuid image_uuids vol_uuids ovf; + add_disks targets guestcaps output_alloc sd_uuid image_uuids vol_uuids + rhv_export_flavor ovf; (* Old virt-v2v ignored removable media. XXX *) @@ -462,20 +486,30 @@ let rec create_ovf source targets guestcaps inspect...
2016 Jun 30
0
[PATCH v2 02/12] genhd: Honor gen_uevent and add disk_gen_uevents
In add_disk(), don't send uevent to userspace when gen_uevent is true; also export the refactored function disk_gen_uevents for later use. Signed-off-by: Fam Zheng <famz at redhat.com> --- block/genhd.c | 23 +++++++++++++++++++---- include/linux/genhd.h | 1 + 2 files changed, 20 insertio...
2018 Aug 15
1
[PATCH v2] v2v: parse_libvirt_xml: number disks from 0
...deletion(-) diff --git a/v2v/parse_libvirt_xml.ml b/v2v/parse_libvirt_xml.ml index 78a6e71c0..dac99511c 100644 --- a/v2v/parse_libvirt_xml.ml +++ b/v2v/parse_libvirt_xml.ml @@ -246,7 +246,7 @@ let parse_libvirt_xml ?conn xml = (* Non-removable disk devices. *) let disks = let get_disks, add_disk = - let disks = ref [] and i = ref 0 in + let disks = ref [] and i = ref (-1) in let get_disks () = List.rev !disks in let add_disk qemu_uri format controller p_source = incr i; -- 2.17.1
2016 Aug 17
20
[PATCH 00/15] Fix issue with KOBJ_ADD uevent versus disk attributes
...ix 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 sysfs entries after that. The fix here is to pass attr_groups from callers to device_add_disk, so it can be added before KOBJ_ADD. Also add basic error handling around device_add_disk code, (or add FIXME comment where work is left)...
2016 Aug 17
20
[PATCH 00/15] Fix issue with KOBJ_ADD uevent versus disk attributes
...ix 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 sysfs entries after that. The fix here is to pass attr_groups from callers to device_add_disk, so it can be added before KOBJ_ADD. Also add basic error handling around device_add_disk code, (or add FIXME comment where work is left)...
2018 Aug 14
1
Re: [PATCH] v2v: parse_libvirt_xml: number disks from 0 (RHBZ#1615885)
...; > > --- a/v2v/parse_libvirt_xml.ml > > > > +++ b/v2v/parse_libvirt_xml.ml > > > > @@ -246,7 +246,7 @@ let parse_libvirt_xml ?conn xml = > > > > (* Non-removable disk devices. *) > > > > let disks = > > > > let get_disks, add_disk = > > > > - let disks = ref [] and i = ref 0 in > > > > + let disks = ref [] and i = ref (-1) in > > > > let get_disks () = List.rev !disks in > > > > let add_disk qemu_uri format controller p_source = > > > >...
2016 Jun 30
2
[PATCH v2 00/12] gendisk: Generate uevent after attribute available
...userspace will instantly start to look > > > for them when this call happens. > > > > Unfortunately it seems impossible to fix this generally without touching the > > 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 va...
2016 Jul 01
1
[PATCH v2 00/12] gendisk: Generate uevent after attribute available
...ode and less flexible IMO. For example, we need at least two > > variants, for attribute_group and device_attribute separately, right? > > Yes, or maybe just a calling convention that just passes both. OK, I can look into that, but I'm not sure about the error handling. Currently add_disk returns void, do you have any plan on that too? should I change it in v3 (to at least return the attribute creation failure)? Fam
2016 Jun 30
2
[PATCH v2 00/12] gendisk: Generate uevent after attribute available
...userspace will instantly start to look > > > for them when this call happens. > > > > Unfortunately it seems impossible to fix this generally without touching the > > 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 va...
2016 Jul 01
1
[PATCH v2 00/12] gendisk: Generate uevent after attribute available
...ode and less flexible IMO. For example, we need at least two > > variants, for attribute_group and device_attribute separately, right? > > Yes, or maybe just a calling convention that just passes both. OK, I can look into that, but I'm not sure about the error handling. Currently add_disk returns void, do you have any plan on that too? should I change it in v3 (to at least return the attribute creation failure)? Fam
2016 Jun 28
2
[PATCH] virtio-blk: Generate uevent after attribute available
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. This race condition can be easily reproduced by hot plugging a number of virtio-blk disks. Also in systemd, there used to be a r...
2016 Jun 28
2
[PATCH] virtio-blk: Generate uevent after attribute available
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. This race condition can be easily reproduced by hot plugging a number of virtio-blk disks. Also in systemd, there used to be a r...
2016 Jun 29
2
[PATCH] virtio-blk: Generate uevent after attribute available
On Tue, 06/28 04:45, Christoph Hellwig wrote: > On Tue, Jun 28, 2016 at 10:39:15AM +0800, Fam Zheng wrote: > > 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. > > > > This race condition can be easily reproduced by hot plugging a number of > &...
2016 Jun 29
2
[PATCH] virtio-blk: Generate uevent after attribute available
On Tue, 06/28 04:45, Christoph Hellwig wrote: > On Tue, Jun 28, 2016 at 10:39:15AM +0800, Fam Zheng wrote: > > 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. > > > > This race condition can be easily reproduced by hot plugging a number of > &...