Bug 10364

Summary: probing dm devices takes a very long time
Product: hal Reporter: Martin Pitt <martin.pitt>
Component: haldAssignee: David Zeuthen (not reading bugmail) <zeuthen>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: danny.kukawka
Version: unspecified   
Hardware: Other   
OS: Linux (All)   
URL: https://launchpad.net/ubuntu/+source/hal/+bug/92647
Whiteboard:
i915 platform: i915 features:
Attachments: verbose hal log

Description Martin Pitt 2007-03-21 09:03:09 UTC
In above bug, hal takes about a minute to start up. A large chunk seems to come from a long series like this:

09:32:11.652 [I] blockdev.c:686: Looking in /sys/block/dm-0/slaves
09:32:11.653 [I] blockdev.c:698:  /sys/block/dm-0/slaves/hda2 -> /sys/block/hda/hda2
09:32:11.653 [I] blockdev.c:698:  /sys/block/dm-0/slaves/hda7 -> /sys/block/hda/hda7
09:32:11.653 [I] blockdev.c:734: Done looking in /sys/block/dm-0/slaves
09:32:11.653 [I] blockdev.c:740: Ignoring hotplug event - no parent
09:32:11.653 [W] blockdev.c:1152: Not adding device object
09:32:11.654 [I] blockdev.c:638: block_add: sysfs_path=/sys/block/dm-1 dev=/dev/mapper/system-server is_part=0, parent=0x00000000
09:32:11.655 [I] blockdev.c:681: Waiting 1000ms to wait for device mapper to be ready
09:32:12.656 [I] blockdev.c:686: Looking in /sys/block/dm-1/slaves
[...]

This does not seem to happen on the majority of computers.
Comment 1 Martin Pitt 2007-03-21 09:04:49 UTC
Created attachment 9249 [details]
verbose hal log

hal debug output
Comment 2 Danny Kukawka 2007-03-22 08:53:17 UTC
Which HAL version is this? I could not find the message (Waiting 1000ms to wait for device mapper to be ready) in current HAL git master code.
Comment 3 Martin Pitt 2007-03-23 02:13:15 UTC
This is the latest stable release, 0.5.8.1. This comes from hald/linux/blockdev.c, hotplug_event_begin_add_blockdev():

                /* sleep one second since device mapper needs additional
                 * time before the device file is ready
                 *
                 * this is a hack and will only affect device mapper block
                 * devices. It can go away once the kernel emits a "changed"
                 * event for the device file (this is about to go upstream)
                 * and we can depend on a released kernel with this feature.
                 */
                if (strncmp (hal_util_get_last_element (sysfs_path), "dm-", 3) == 0) {
                        HAL_INFO (("Waiting 1000ms to wait for device mapper to be ready", path));
                        usleep (1000 * 1000);
                }

Indeed git head looks completely different, so let's assume for now that this is fixed already. Thank you!

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.